php.net |  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 Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
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.

Patches

Pull Requests

History

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

--- ../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] stas@php.net
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] sniper@php.net
This should be fixed with PHP 4.0.6, please try the 
latest release candidate:

http://www.php.net/~andi/php-4.0.6RC2.tar.gz

-Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC