com php-src: Fix bug #75481: makedev warning: ext/posix/config.m4 ext/posix/posix.c
| From: | Nikita Popov | Date: | Tue, 04 Sep 2018 03:13:45 +0000 |
| Subject: | com php-src: Fix bug #75481: makedev warning: ext/posix/config.m4 ext/posix/posix.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102982@lists.php.net to get a copy of this message | ||
Commit: 870d893d0bd3f4055ec1d61058aafdadf666b117
Author: Peter Kokot <peterkokot@gmail.com> Wed, 13 Jun 2018 04:36:55 +0200
Committer: Nikita Popov <nikita.ppv@gmail.com> Tue, 4 Sep 2018 05:13:45 +0200
Parents: 742783c3ee4df424b5bd9130028951259ca52860
Branches: PHP-7.1 PHP-7.2 PHP-7.3 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=870d893d0bd3f4055ec1d61058aafdadf666b117
Log:
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.
Bugs:
https://bugs.php.net/75481
Changed paths:
M ext/posix/config.m4
M ext/posix/posix.c
Diff:
diff --git a/ext/posix/config.m4 b/ext/posix/config.m4
index 0c4c305..9bc1dae 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 27d91f8..e3a2bc7 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);