src/solaris/native/sun/nio/ch/DatagramChannelImpl.c

Print this page
rev 8975 : 8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests

*** 79,89 **** #ifdef __solaris__ rv = connect(fd, 0, 0); #endif ! #if defined(__linux__) || defined(_ALLBSD_SOURCE) { int len; SOCKADDR sa; memset(&sa, 0, sizeof(sa)); --- 79,89 ---- #ifdef __solaris__ rv = connect(fd, 0, 0); #endif ! #if defined(__linux__) || defined(_ALLBSD_SOURCE) || defined(_AIX) { int len; SOCKADDR sa; memset(&sa, 0, sizeof(sa));
*** 113,122 **** --- 113,130 ---- #if defined(_ALLBSD_SOURCE) if (rv < 0 && errno == EADDRNOTAVAIL) rv = errno = 0; #endif + #if defined(_AIX) + /* See W. Richard Stevens, "UNIX Network Programming, Volume 1", p. 254: + * 'Setting the address family to AF_UNSPEC might return EAFNOSUPPORT + * but that is acceptable. + */ + if (rv < 0 && errno == EAFNOSUPPORT) + rv = errno = 0; + #endif } #endif if (rv < 0) handleSocketError(env, errno);