PHP 4.0 Bug #7534 Updated: configure test for POSIX readdir_r dumps core
| From: | sniper@php.net | Date: | Tue, 31 Oct 2000 00:40:10 +0000 |
| Subject: | PHP 4.0 Bug #7534 Updated: configure test for POSIX readdir_r dumps core | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-36504@lists.php.net to get a copy of this message | ||
ID: 7534
Updated by: sniper
Reported By: mills@cc.umanitoba.ca
Status: Closed
Bug Type: *Install and Config
Assigned To:
Comments:
This is fixed in CVS. Please grab a snapshot from http://snaps.php.net/
and reopen this bug report if problem still exists with it.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-10-30 12:12:30] mills@cc.umanitoba.ca
make fails with the following error:
"reentrancy.c", line 106: prototype mismatch: 2 args passed, 3 expected
cc: acomp failed for reentrancy.c
*** Error code 1
The bug is in the test program in the configure script.
Because the `entry' array is not initialized to zeroes
the readdir_r call causes a core dump. A quick fix is
to make it a global variable. Here's a patch:
*** Oconfigure Sun Oct 15 06:47:10 2000
--- configure Sun Oct 29 12:23:04 2000
***************
*** 6879,6888 ****
#include <sys/types.h>
#include <dirent.h>
main() {
DIR *dir;
! char entry[sizeof(struct dirent)+257];
! struct dirent *pentry = (struct dirent *) &entry;
dir = opendir("/");
if (!dir)
--- 6879,6888 ----
#include <sys/types.h>
#include <dirent.h>
+ char entry[sizeof(struct dirent)+257];
main() {
DIR *dir;
! struct dirent *pentry;
dir = opendir("/");
if (!dir)
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7534