summaryrefslogtreecommitdiff
path: root/user/php7/getsockopt.patch
diff options
context:
space:
mode:
authorA. Wilcox <awilcox@wilcox-tech.com>2020-04-05 12:51:59 +0000
committerA. Wilcox <awilcox@wilcox-tech.com>2020-04-05 12:51:59 +0000
commit343e40efb539159bff58339cae63279e2a7cf9c2 (patch)
tree114140210c76d51c9946300ec02fa676aebf6ad5 /user/php7/getsockopt.patch
parent0b10cc74d61cd3b81c5f3b54d44bc6c3e1723a03 (diff)
parentaf409aaaaf71ee25115f59e64bf8ea566d278176 (diff)
downloadpackages-343e40efb539159bff58339cae63279e2a7cf9c2.tar.gz
packages-343e40efb539159bff58339cae63279e2a7cf9c2.tar.bz2
packages-343e40efb539159bff58339cae63279e2a7cf9c2.tar.xz
packages-343e40efb539159bff58339cae63279e2a7cf9c2.zip
Merge branch 'bump/php744' into 'master'
Bump PHP to 7.4.4 See merge request adelie/packages!423
Diffstat (limited to 'user/php7/getsockopt.patch')
-rw-r--r--user/php7/getsockopt.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/user/php7/getsockopt.patch b/user/php7/getsockopt.patch
new file mode 100644
index 000000000..81f2bc232
--- /dev/null
+++ b/user/php7/getsockopt.patch
@@ -0,0 +1,37 @@
+Socket options with level IPPROTO_IP and IPPROTO_IPV6 cannot be handled
+in the same switch statement as options with level SOL_SOCKET since
+there may be collisions in their numerical values.
+
+For example, on ppc64:
+
+* IPV6_MULTICAST_HOPS and SO_RCVTIMEO are both 18
+* IPV6_MULTICAST_LOOP and SO_SNDTIMEO are both 19
+
+etc.
+
+--- php-7.4.4/ext/sockets/sockets.c 2020-03-17 06:40:21.000000000 -0400
++++ php-7.4.4/ext/sockets/sockets.c 2020-03-29 22:39:57.506751737 -0400
+@@ -2008,6 +2008,7 @@ PHP_FUNCTION(socket_get_option)
+ }
+ }
+ }
++ goto handle_default;
+ }
+ #if HAVE_IPV6
+ else if (level == IPPROTO_IPV6) {
+@@ -2017,6 +2018,7 @@ PHP_FUNCTION(socket_get_option)
+ } else if (ret == FAILURE) {
+ RETURN_FALSE;
+ } /* else continue */
++ goto handle_default;
+ }
+ #endif
+
+@@ -2063,6 +2065,7 @@ PHP_FUNCTION(socket_get_option)
+ break;
+
+ default:
++ handle_default:
+ optlen = sizeof(other_val);
+
+ if (getsockopt(php_sock->bsd_socket, level, optname, (char*)&other_val, &optlen) != 0) {