summaryrefslogtreecommitdiff
path: root/main/php_reentrancy.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/php_reentrancy.h')
-rw-r--r--main/php_reentrancy.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/main/php_reentrancy.h b/main/php_reentrancy.h
index a6aeb363d1..0cba46e896 100644
--- a/main/php_reentrancy.h
+++ b/main/php_reentrancy.h
@@ -22,6 +22,8 @@
#include "php.h"
+#include <sys/types.h>
+#include <dirent.h>
#include <time.h>
/* currently, PHP does not check for these functions, but assumes
@@ -40,6 +42,13 @@
#undef HAVE_GMTIME_R
#endif
+#if defined(HAVE_POSIX_READDIR_R)
+#define php_readdir_r readdir_r
+#else
+PHPAPI int php_readdir_r(DIR *dirp, struct dirent *entry,
+ struct dirent **result);
+#endif
+
#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME)
#define PHP_NEED_REENTRANCY 1
PHPAPI struct tm *php_localtime_r(const time_t *const timep, struct tm *p_tm);