mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
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:
parent
0fddc30b7a
commit
662c6c6c06
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue