Skip to content

Commit 870d893

Browse files
petknikic
authored andcommitted
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.
1 parent 742783c commit 870d893

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

ext/posix/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if test "$PHP_POSIX" = "yes"; then
99
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
1010
PHP_NEW_EXTENSION(posix, posix.c, $ext_shared)
1111

12-
AC_CHECK_HEADERS(sys/mkdev.h)
12+
AC_CHECK_HEADERS([sys/mkdev.h sys/sysmacros.h])
1313

1414
AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod setrlimit getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
1515

ext/posix/posix.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
#if HAVE_SYS_MKDEV_H
5353
# include <sys/mkdev.h>
5454
#endif
55+
#if HAVE_SYS_SYSMACROS_H
56+
# include <sys/sysmacros.h>
57+
#endif
5558

5659
ZEND_DECLARE_MODULE_GLOBALS(posix)
5760
static PHP_MINFO_FUNCTION(posix);

0 commit comments

Comments
 (0)