]> granicus.if.org Git - php/commitdiff
In NetWare statfs f_bavail member is known as f_bfree
authorAnantha Kesari H Y <hyanantha@php.net>
Mon, 21 Feb 2005 09:08:54 +0000 (09:08 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Mon, 21 Feb 2005 09:08:54 +0000 (09:08 +0000)
ext/standard/filestat.c

index 9eb7768b9b5e7f70c654722ba5686a84b7652cb4..b72448e1f7f7adea8f5c70b2ff5282e8e08787be 100644 (file)
@@ -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);