summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/posix/config.m42
-rw-r--r--ext/posix/posix.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/ext/posix/config.m4 b/ext/posix/config.m4
index 0c4c30561e..9bc1dae56c 100644
--- a/ext/posix/config.m4
+++ b/ext/posix/config.m4
@@ -9,7 +9,7 @@ if test "$PHP_POSIX" = "yes"; then
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
PHP_NEW_EXTENSION(posix, posix.c, $ext_shared)
- AC_CHECK_HEADERS(sys/mkdev.h)
+ AC_CHECK_HEADERS([sys/mkdev.h sys/sysmacros.h])
AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod setrlimit getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 066139df29..b3b9de8736 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -52,6 +52,9 @@
#if HAVE_SYS_MKDEV_H
# include <sys/mkdev.h>
#endif
+#if HAVE_SYS_SYSMACROS_H
+# include <sys/sysmacros.h>
+#endif
ZEND_DECLARE_MODULE_GLOBALS(posix)
static PHP_MINFO_FUNCTION(posix);