equal
deleted
inserted
replaced
961 optlen = sizeof(optval.i); |
961 optlen = sizeof(optval.i); |
962 |
962 |
963 } |
963 } |
964 |
964 |
965 if (NET_SetSockOpt(fd, level, optname, (const void *)&optval, optlen) < 0) { |
965 if (NET_SetSockOpt(fd, level, optname, (const void *)&optval, optlen) < 0) { |
966 #ifdef __solaris__ |
966 #if defined(__solaris__) || defined(_AIX) |
967 if (errno == EINVAL) { |
967 if (errno == EINVAL) { |
968 // On Solaris setsockopt will set errno to EINVAL if the socket |
968 // On Solaris setsockopt will set errno to EINVAL if the socket |
969 // is closed. The default error message is then confusing |
969 // is closed. The default error message is then confusing |
970 char fullMsg[128]; |
970 char fullMsg[128]; |
971 jio_snprintf(fullMsg, sizeof(fullMsg), "Invalid option or socket reset by remote peer"); |
971 jio_snprintf(fullMsg, sizeof(fullMsg), "Invalid option or socket reset by remote peer"); |