0004-OPcache-flock-mechanism-is-obviously-linux-so-force-.patch 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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.
  5. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  6. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  7. [Bernd: update for 7.2.12 & 7.3.2]
  8. Signed-off-by: Adam Duskett <aduskett@gmail.com>
  9. [aduskett@gmail.com: Update for 7.3.0]
  10. ---
  11. ext/opcache/config.m4 | 34 ++--------------------------------
  12. 1 file changed, 2 insertions(+), 32 deletions(-)
  13. diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
  14. index fbb9b21..ffddc8e 100644
  15. --- a/ext/opcache/config.m4
  16. +++ b/ext/opcache/config.m4
  17. @@ -334,58 +334,8 @@ int main() {
  18. msg=yes],[msg=no],[msg=no])
  19. AC_MSG_RESULT([$msg])
  20. -flock_type=unknown
  21. -AC_MSG_CHECKING(for struct flock layout)
  22. -
  23. -if test "$flock_type" = "unknown"; then
  24. -AC_RUN_IFELSE([AC_LANG_SOURCE([[
  25. - #include <fcntl.h>
  26. - struct flock lock = { 1, 2, 3, 4, 5, 6, 7 };
  27. - int main() {
  28. - if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 6 && lock.l_len== 7) {
  29. - return 0;
  30. - }
  31. - return 1;
  32. - }
  33. -]])], [
  34. - flock_type=aix64
  35. - AC_DEFINE([HAVE_FLOCK_AIX64], [], [Struct flock is 64-bit AIX-type])
  36. -], [])
  37. -fi
  38. -
  39. -if test "$flock_type" = "unknown"; then
  40. -AC_RUN_IFELSE([AC_LANG_SOURCE([[
  41. - #include <fcntl.h>
  42. - struct flock lock = { 1, 2, 3, 4, 5 };
  43. - int main() {
  44. - if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
  45. - return 0;
  46. - }
  47. - return 1;
  48. - }
  49. -]])], [
  50. - flock_type=linux
  51. - AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
  52. -], [])
  53. -fi
  54. -
  55. -if test "$flock_type" = "unknown"; then
  56. -AC_RUN_IFELSE([AC_LANG_SOURCE([[
  57. - #include <fcntl.h>
  58. - struct flock lock = { 1, 2, 3, 4, 5 };
  59. - int main() {
  60. - if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
  61. - return 0;
  62. - }
  63. - return 1;
  64. - }
  65. -]])], [
  66. - flock_type=bsd
  67. - AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type])
  68. -], [])
  69. -fi
  70. -
  71. -AC_MSG_RESULT([$flock_type])
  72. +flock_type=linux
  73. +AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type])
  74. if test "$flock_type" = "unknown"; then
  75. AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no])
  76. --
  77. 2.7.4