diff options
author | Peter Kokot <peterkokot@gmail.com> | 2018-06-13 04:36:55 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2018-09-04 05:13:45 +0200 |
commit | 870d893d0bd3f4055ec1d61058aafdadf666b117 (patch) | |
tree | 578e0b9e45a2c247187fbccdba0026081daa0118 | |
parent | 742783c3ee4df424b5bd9130028951259ca52860 (diff) | |
download | php-git-870d893d0bd3f4055ec1d61058aafdadf666b117.tar.gz |
Fix bug #75481: makedev warning
To use makedev the sys/sysmacros.h needs to be included on newer
systems.
Cherry-picked from PHP-7.3.
-rw-r--r-- | ext/posix/config.m4 | 2 | ||||
-rw-r--r-- | ext/posix/posix.c | 3 |
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 27d91f8a6c..e3a2bc739d 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); |