summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2018-09-04 05:32:42 +0200
committerNikita Popov <nikita.ppv@gmail.com>2018-09-04 05:32:42 +0200
commit08addfea8637109ec988dcbb4d22f0f39b597264 (patch)
tree0bf61f1c235b2b12a0a349966e4d388e2e277f59
parentfcf78dfb8957f65351222752f2dcd85935ee2192 (diff)
parentf1f39d7ed7fb6f6aaa2edea165aae4bc58a09de7 (diff)
downloadphp-git-08addfea8637109ec988dcbb4d22f0f39b597264.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
-rw-r--r--ext/phar/phar.c2
-rw-r--r--ext/posix/config.m42
-rw-r--r--ext/posix/posix.c3
3 files changed, 5 insertions, 2 deletions
diff --git a/ext/phar/phar.c b/ext/phar/phar.c
index 93c3d14801..11c9d270a6 100644
--- a/ext/phar/phar.c
+++ b/ext/phar/phar.c
@@ -1843,7 +1843,7 @@ static int phar_check_str(const char *fname, const char *ext_str, int ext_len, i
pos = strstr(ext_str, ".phar");
if (!pos
- || pos != ext_str && (*(pos - 1) == '/')
+ || (pos != ext_str && (*(pos - 1) == '/'))
|| (ext_len - (pos - ext_str)) < 5
|| !(pos += 5)
|| !(*pos == '\0' || *pos == '/' || *pos == '.')) {
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 1775fb6603..0a764bab33 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);