php7: fix cross compiling patch (fixes #8166)
authorMichael Heimpold <mhei@heimpold.de>
Sun, 10 Feb 2019 20:45:16 +0000 (21:45 +0100)
committerMichael Heimpold <mhei@heimpold.de>
Sun, 10 Feb 2019 20:50:25 +0000 (21:50 +0100)
Fixes: e148924a4 ("php7: update to 7.2.15")
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
lang/php7/patches/1003-Fix-dl-cross-compiling-issue.patch

index 951b32573e7700b38e52d129ff91ed59960f4b69..075a98354ce48d874e217138a95f0abe11cfe85f 100644 (file)
    PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
 --- a/ext/opcache/config.m4
 +++ b/ext/opcache/config.m4
-@@ -261,7 +261,11 @@ AC_TRY_RUN([
- ], [
-       flock_type=linux
-     AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
--], [])
-+], [
-+    dnl cross-compiling; assume Linux
-+      flock_type=linux
-+    AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
-+])
- fi
+@@ -232,6 +232,10 @@ int main() {
+ flock_type=unknown
+ AC_MSG_CHECKING(for struct flock layout)
  
++dnl cross-compiling for Linux
++flock_type=linux
++AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
++
  if test "$flock_type" = "unknown"; then
+ AC_TRY_RUN([
+   #include <fcntl.h>