diff --git a/libs/port/statvfs.c b/libs/port/statvfs.c index d63c5ab31fa..9d672119aed 100644 --- a/libs/port/statvfs.c +++ b/libs/port/statvfs.c @@ -25,6 +25,7 @@ #include #include +#include #ifdef HAVE_SYS_PARAM_H # include #endif @@ -43,6 +44,7 @@ int statvfs( const char *path, struct statvfs *buf ) { int ret; +#ifdef HAVE_STATFS struct statfs info; /* FIXME: add autoconf check for this */ @@ -86,6 +88,10 @@ int statvfs( const char *path, struct statvfs *buf ) buf->f_favail = info.f_ffree; #endif } +#else /* HAVE_STATFS */ + ret = -1; + errno = ENOSYS; +#endif /* HAVE_STATFS */ return ret; }