src/solaris/native/java/net/PlainSocketImpl.c

Print this page
rev 8725 : 8024854: Basic changes and files to build the class library on AIX
Contributed-by: luchsh@linux.vnet.ibm.com, spoole@linux.vnet.ibm.com, thomas.stuefe@sap.com
Reviewed-by: alanb, prr, sla, chegar, michaelm, mullan

@@ -961,11 +961,11 @@
             optlen = sizeof(optval.i);
 
     }
 
     if (NET_SetSockOpt(fd, level, optname, (const void *)&optval, optlen) < 0) {
-#ifdef __solaris__
+#if defined(__solaris__) || defined(_AIX)
         if (errno == EINVAL) {
             // On Solaris setsockopt will set errno to EINVAL if the socket
             // is closed. The default error message is then confusing
             char fullMsg[128];
             jio_snprintf(fullMsg, sizeof(fullMsg), "Invalid option or socket reset by remote peer");