php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #72974
Patch php-7.0.3-aix-imap2.patch revision 2016-08-30 13:11 UTC by matthieu dot sarter dot external at atos dot net

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;
 	}

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC