termux-packages/packages/php/ext-opcache-config.m4.patch
2019-02-16 01:33:22 +01:00

52 lines
1.6 KiB
Diff

diff -u -r ../php-7.3.2/ext/opcache/config.m4 ./ext/opcache/config.m4
--- ../php-7.3.2/ext/opcache/config.m4 2019-02-05 13:10:04.000000000 +0000
+++ ./ext/opcache/config.m4 2019-02-09 01:48:59.965492259 +0000
@@ -145,7 +145,9 @@
}
]])],[dnl
AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
- msg=yes],[msg=no],[msg=no])
+ msg=yes],[msg=no],
+ AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support])
+ msg=yes)
AC_MSG_RESULT([$msg])
AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support)
@@ -347,22 +349,6 @@
if test "$flock_type" = "unknown"; then
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <fcntl.h>
- struct flock lock = { 1, 2, 3, 4, 5, 6, 7 };
- int main() {
- if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 6 && lock.l_len== 7) {
- return 0;
- }
- return 1;
- }
-]])], [
- flock_type=aix64
- AC_DEFINE([HAVE_FLOCK_AIX64], [], [Struct flock is 64-bit AIX-type])
-], [])
-fi
-
-if test "$flock_type" = "unknown"; then
-AC_RUN_IFELSE([AC_LANG_SOURCE([[
- #include <fcntl.h>
struct flock lock = { 1, 2, 3, 4, 5 };
int main() {
if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
@@ -373,7 +359,12 @@
]])], [
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])
+ AC_MSG_RESULT("yes")
+])
fi
if test "$flock_type" = "unknown"; then