summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in8
-rw-r--r--main/php_scandir.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/configure.in b/configure.in
index ef501a3e5d..5aca18911b 100644
--- a/configure.in
+++ b/configure.in
@@ -317,16 +317,12 @@ dnl -------------------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_STDC
+AC_HEADER_DIRENT
-dnl In QNX opendir resides in libc but dirent.h is still required
-if test "`uname -s 2>/dev/null`" != "QNX"; then
- AC_HEADER_DIRENT
-else
- AC_CHECK_HEADERS(dirent.h)
-fi
PHP_MISSING_FCLOSE_DECL
dnl QNX requires unix.h to allow functions in libunix to work properly
AC_CHECK_HEADERS([ \
+dirent.h \
ApplicationServices/ApplicationServices.h \
sys/param.h \
sys/types.h \
diff --git a/main/php_scandir.h b/main/php_scandir.h
index 961188e7ad..416e3d88cf 100644
--- a/main/php_scandir.h
+++ b/main/php_scandir.h
@@ -24,6 +24,10 @@
#include <sys/types.h>
+#ifdef HAVE_SYS_DIR_H
+#include <sys/dir.h>
+#endif
+
#ifdef PHP_WIN32
#include "config.w32.h"
#include "win32/readdir.h"