Fix readdir bug in libc5

@Fix readdir bug in libc5
# If libc5 receives 0 in *result of readdir_r, it just returns error
# That's a clear bug, so this is a workaround.
This commit is contained in:
Stanislav Malyshev 2000-09-07 17:55:53 +00:00
parent 0fddc30b7a
commit 662c6c6c06

View file

@ -290,7 +290,7 @@ PHP_FUNCTION(readdir)
pval **id, **tmp, *myself; pval **id, **tmp, *myself;
php_dir *dirp; php_dir *dirp;
char entry[sizeof(struct dirent)+MAXPATHLEN+1]; char entry[sizeof(struct dirent)+MAXPATHLEN+1];
struct dirent *result; struct dirent *result = (struct dirent *)&entry; /* patch for libc5 readdir problems */
DIRLS_FETCH(); DIRLS_FETCH();
FETCH_DIRP(); FETCH_DIRP();