diff -r e7dcfb17bf53 -r cf8cda42cd52 jdk/src/solaris/native/java/net/bsd_close.c --- a/jdk/src/solaris/native/java/net/bsd_close.c Fri Feb 28 13:38:51 2014 +0100 +++ b/jdk/src/solaris/native/java/net/bsd_close.c Tue Mar 04 13:27:55 2014 +0000 @@ -38,8 +38,6 @@ #include #include -#include "jni_util.h" - /* * Stack allocated by thread when doing blocking operation */ @@ -333,7 +331,7 @@ * Auto restarts with adjusted timeout if interrupted by * signal other than our wakeup signal. */ -int NET_Timeout(JNIEnv *env, int s, long timeout) { +int NET_Timeout(int s, long timeout) { long prevtime = 0, newtime; struct timeval t, *tp = &t; fd_set fds; @@ -376,8 +374,7 @@ int length = (howmany(s+1, NFDBITS)) * sizeof(int); fdsp = (fd_set *) calloc(1, length); if (fdsp == NULL) { - JNU_ThrowOutOfMemoryError(env, "NET_Select native heap allocation failed"); - return 0; + return -1; // errno will be set to ENOMEM } allocated = 1; }