summaryrefslogtreecommitdiffstats
path: root/package/php/0004-flock-type-linux.patch
diff options
context:
space:
mode:
authorGustavo Zacarias <gustavo@zacarias.com.ar>2015-04-08 12:39:29 -0300
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-04-08 21:24:46 +0200
commite05476491720f96fcbeb926b4599d111efb598a6 (patch)
tree9379994eb5587c3b779f8e58d6a66f3526acc5d8 /package/php/0004-flock-type-linux.patch
parent4959dabe7dfbe851e1848ff783f1b37a9fb0c0f2 (diff)
downloadbuildroot-e05476491720f96fcbeb926b4599d111efb598a6.tar.gz
buildroot-e05476491720f96fcbeb926b4599d111efb598a6.zip
php: add opcache option
Add a Zend OPcache option and tweak the build system into being cross-compile friendly. The OPcache extension allows for a neat intermediate bytecode cache in memory to avoid reinterpreting/recompiling php scripts on multiple runs. Make it an option since this takes up valuable RAM. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/php/0004-flock-type-linux.patch')
-rw-r--r--package/php/0004-flock-type-linux.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/package/php/0004-flock-type-linux.patch b/package/php/0004-flock-type-linux.patch
new file mode 100644
index 0000000000..a03c2624a7
--- /dev/null
+++ b/package/php/0004-flock-type-linux.patch
@@ -0,0 +1,48 @@
+OPcache: flock mechanism is obviously linux so force it.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura php-5.6.7.orig/ext/opcache/config.m4 php-5.6.7/ext/opcache/config.m4
+--- php-5.6.7.orig/ext/opcache/config.m4 2015-04-08 11:08:11.125845540 -0300
++++ php-5.6.7/ext/opcache/config.m4 2015-04-08 11:57:23.648831436 -0300
+@@ -326,38 +326,8 @@
+ msg=yes,msg=no,msg=no)
+ AC_MSG_RESULT([$msg])
+
+-flock_type=unknown
+-AC_MSG_CHECKING("whether flock struct is linux ordered")
+-AC_TRY_RUN([
+- #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) {
+- return 0;
+- }
+- return 1;
+- }
+-], [
+- flock_type=linux
+- AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+- AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
+-
+-AC_MSG_CHECKING("whether flock struct is BSD ordered")
+-AC_TRY_RUN([
+- #include <fcntl.h>
+- struct flock lock = { 1, 2, 3, 4, 5 };
+- int main() {
+- if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
+- return 0;
+- }
+- return 1;
+- }
+-], [
+- flock_type=bsd
+- AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
+- AC_MSG_RESULT("yes")
+-], AC_MSG_RESULT("no") )
++flock_type=linux
++AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
+
+ if test "$flock_type" == "unknown"; then
+ AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
OpenPOWER on IntegriCloud