PHP 4.0 Bug #8027 Updated: diskfreespace always return 0 in FreeBSD

From: Date: Tue, 12 Dec 2000 12:12:43 +0000
Subject: PHP 4.0 Bug #8027 Updated: diskfreespace always return 0 in FreeBSD
Groups: php.dev 
Request: Send a blank email to php-dev+get-40957@lists.php.net to get a copy of this message
ID: 8027 Updated by: stas Reported By: akss@programmer.net Old-Status: Open Status: Analyzed Bug Type: Filesystem function related Assigned To: Comments: 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. Previous Comments: --------------------------------------------------------------------------- [2000-11-29 04:38:01] akss@programmer.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-11-29 04:33:28] akss@programmer.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. --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=8027

« previous php.dev (#40957) next »