1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 00:53:30 +02:00

Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  Fixed #72974 imap is undefined service on AIX
This commit is contained in:
Joe Watkins
2017-01-09 05:15:34 +00:00

View File

@@ -5606,6 +5606,15 @@ PHP_FUNCTION(getservbyname)
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;
}