Patch php-7.0.3-aix-imap2.patch for Network related Bug #72974
Patch version 2016-08-30 13:11 UTC
Return to Bug #72974 |
Download this patch
Patch Revisions:
Developer: matthieu.sarter.external@atos.net
diff -Nur php-7.0.3.orig/ext/standard/basic_functions.c php-7.0.3-aix/ext/standard/basic_functions.c
--- php-7.0.3.orig/ext/standard/basic_functions.c 2016-02-02 17:32:29 +0100
+++ php-7.0.3-aix/ext/standard/basic_functions.c 2016-03-11 13:45:55 +0100
@@ -5560,6 +5560,15 @@
serv = getservbyname(name, proto);
+#if defined(_AIX)
+ /*
+ On AIX, imap is only known as imap2 in /etc/services, while on Linux imap is an alias for imap2.
+ If a request for imap gives no result, we try again with imap2.
+ */
+ if (serv == NULL && strcmp(name, "imap") == 0) {
+ serv = getservbyname("imap2", proto);
+ }
+#endif
if (serv == NULL) {
RETURN_FALSE;
}
|