diff --git a/ext/posix/config.m4 b/ext/posix/config.m4 index 0c4c30561e0..9bc1dae56c3 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 066139df29f..b3b9de87363 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -52,6 +52,9 @@ #if HAVE_SYS_MKDEV_H # include #endif +#if HAVE_SYS_SYSMACROS_H +# include +#endif ZEND_DECLARE_MODULE_GLOBALS(posix) static PHP_MINFO_FUNCTION(posix);