mirror of
https://github.com/php/php-src.git
synced 2025-01-23 20:23:31 +08:00
@- Fixed a bug which made readdir() unusable in some systems. (Jani)
# Bug report: #7390
This commit is contained in:
parent
5c16c9fa1a
commit
e5a997ff59
@ -104,15 +104,15 @@ PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
|
||||
errno = 0;
|
||||
|
||||
ret = readdir_r(dirp, entry);
|
||||
|
||||
if (ret == 0)
|
||||
*result = entry;
|
||||
else if (errno == 0) {
|
||||
|
||||
if (!ret || errno != 0) {
|
||||
*result = NULL;
|
||||
ret = 0;
|
||||
} else {
|
||||
*result = entry;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return errno;
|
||||
|
||||
#else
|
||||
struct dirent *ptr;
|
||||
int ret = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user