summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorAnantha Kesari H Y <hyanantha@php.net>2005-02-21 09:08:54 +0000
committerAnantha Kesari H Y <hyanantha@php.net>2005-02-21 09:08:54 +0000
commitf43386764f90078c3be0ed08780500b0368ae9da (patch)
tree3d81694a31bb5a24afd5554b86d096005fce70f3 /ext
parent8d73dc7bfcbed79abb762f301f8e72deaeaed0b6 (diff)
downloadphp-git-f43386764f90078c3be0ed08780500b0368ae9da.tar.gz
In NetWare statfs f_bavail member is known as f_bfree
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/filestat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index 9eb7768b9b..b72448e1f7 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);