From 86a8f4cd3c206b2f91fd27e57fb6c5bba769f62d Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 10 Mar 2004 01:55:12 +0000 Subject: [PATCH] Check that we have statfs before using it. --- libs/port/statvfs.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- 2.11.4.GIT