From f43386764f90078c3be0ed08780500b0368ae9da Mon Sep 17 00:00:00 2001 From: Anantha Kesari H Y Date: Mon, 21 Feb 2005 09:08:54 +0000 Subject: [PATCH] In NetWare statfs f_bavail member is known as f_bfree --- ext/standard/filestat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 9eb7768b9b5..b72448e1f7f 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -311,8 +311,12 @@ PHP_FUNCTION(disk_free_space) } #elif (defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_MOUNT_H)) && defined(HAVE_STATFS) if (statfs(Z_STRVAL_PP(path), &buf)) RETURN_FALSE; +#ifdef NETWARE + bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bfree)); +#else bytesfree = (((double)buf.f_bsize) * ((double)buf.f_bavail)); #endif +#endif #endif /* WINDOWS */ RETURN_DOUBLE(bytesfree);