Lines 1540-1550
Link Here
|
1540 |
struct dirent *cReadDir::Next(void) |
1540 |
struct dirent *cReadDir::Next(void) |
1541 |
{ |
1541 |
{ |
1542 |
if (directory) { |
1542 |
if (directory) { |
1543 |
#if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 |
1543 |
#if defined(__GLIBC__) |
|
|
1544 |
#if defined(__GLIBC_PREREQ) &&!__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24 |
1544 |
while (readdir_r(directory, &u.d, &result) == 0 && result) { |
1545 |
while (readdir_r(directory, &u.d, &result) == 0 && result) { |
1545 |
#else |
1546 |
#else |
1546 |
while ((result = readdir(directory)) != NULL) { |
1547 |
while ((result = readdir(directory)) != NULL) { |
1547 |
#endif |
1548 |
#endif |
|
|
1549 |
#endif |
1548 |
if (strcmp(result->d_name, ".") && strcmp(result->d_name, "..")) |
1550 |
if (strcmp(result->d_name, ".") && strcmp(result->d_name, "..")) |
1549 |
return result; |
1551 |
return result; |
1550 |
} |
1552 |
} |