diff options
Diffstat (limited to 'src/posix.h')
-rw-r--r-- | src/posix.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/posix.h b/src/posix.h index 5799c0499..d423b7e07 100644 --- a/src/posix.h +++ b/src/posix.h @@ -83,6 +83,16 @@ extern int p_gettimeofday(struct timeval *tv, struct timezone *tz); # include "unix/posix.h" #endif +#ifndef NO_READDIR_R #define p_readdir_r(d,e,r) readdir_r(d,e,r) +#else +#include <dirent.h> +GIT_INLINE(int) p_readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result) +{ + GIT_UNUSED(entry); + *result = readdir(dirp); + return 0; +} +#endif #endif |