website: update Free Electrons logo
[buildroot-gz.git] / package / php / 0004-OPcache-flock-mechanism-is-obviously-linux-so-force-.patch
blob9b530361c991df929cf54835e337daeec3210ebb
1 From bedbd41ef0a5ce80b83a6f6eaebd7c90f0bc5615 Mon Sep 17 00:00:00 2001
2 From: Gustavo Zacarias <gustavo@zacarias.com.ar>
3 Date: Tue, 9 Aug 2016 11:52:19 +0200
4 Subject: [PATCH] OPcache: flock mechanism is obviously linux so force it.
6 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
7 ---
8 ext/opcache/config.m4 | 34 ++--------------------------------
9 1 file changed, 2 insertions(+), 32 deletions(-)
11 diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
12 index fbb9b21..ffddc8e 100644
13 --- a/ext/opcache/config.m4
14 +++ b/ext/opcache/config.m4
15 @@ -343,38 +343,8 @@ int main() {
16 msg=yes,msg=no,msg=no)
17 AC_MSG_RESULT([$msg])
19 -flock_type=unknown
20 -AC_MSG_CHECKING("whether flock struct is linux ordered")
21 -AC_TRY_RUN([
22 - #include <fcntl.h>
23 - struct flock lock = { 1, 2, 3, 4, 5 };
24 - int main() {
25 - if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
26 - return 0;
27 - }
28 - return 1;
29 - }
30 -], [
31 - flock_type=linux
32 - AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
33 - AC_MSG_RESULT("yes")
34 -], AC_MSG_RESULT("no") )
36 -AC_MSG_CHECKING("whether flock struct is BSD ordered")
37 -AC_TRY_RUN([
38 - #include <fcntl.h>
39 - struct flock lock = { 1, 2, 3, 4, 5 };
40 - int main() {
41 - if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
42 - return 0;
43 - }
44 - return 1;
45 - }
46 -], [
47 - flock_type=bsd
48 - AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
49 - AC_MSG_RESULT("yes")
50 -], AC_MSG_RESULT("no") )
51 +flock_type=linux
52 +AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
54 if test "$flock_type" = "unknown"; then
55 AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
56 --
57 2.7.4