|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8027 diskfreespace always return 0 in FreeBSD
Submitted: 2000-11-29 04:33 UTC Modified: 2001-06-03 01:39 UTC
From: akss at programmer dot net Assigned:
Status: Closed Package: Filesystem function related
PHP Version: 4.0.3pl1 OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
33 + 2 = ?
Subscribe to this entry?

 [2000-11-29 04:33 UTC] akss at programmer dot net
file: php/functions/filestat.c

Need add include sys/param.h & sys/mount.h for FreeBSD. Otherwise diskfreespace always return 0 (gcc error: storage size of `buf' isn't known)

This bug is true for 3.0.x & 4.0.x versions.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-29 04:38 UTC] akss at programmer dot net

--- ../php/functions/filestat.c.orig    Wed Nov 29 15:14:40 2000
+++ ../php/functions/filestat.c Wed Nov 29 15:14:17 2000
@@ -35,6 +35,8 @@
 #include <stdlib.h>
 #include <sys/stat.h>
+#include <sys/param.h>
+#include <sys/mount.h>
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>

 [2000-12-12 07:12 UTC]
The proposed patch won't help, since BSD has no statfs.h and
statvfs.h and PHP for some reason checks for that. Actually,
FreeBSD needs sys/param.h and sys/mount.h, as stated in man,
but not stat[v]fs.h. Maybe somebody of configure wizards can
look at it.
 [2001-06-03 01:39 UTC]
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:


PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 23:01:30 2024 UTC