|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: akss at programmer dot net
New email:
PHP Version: OS:


 [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: Wed Jul 17 10:01:28 2024 UTC