--- old/src/solaris/native/sun/nio/ch/NativeThread.c 2012-03-08 15:28:26.401656968 +0800 +++ new/src/solaris/native/sun/nio/ch/NativeThread.c 2012-03-08 15:28:25.977656969 +0800 @@ -33,7 +33,7 @@ #include "nio_util.h" -#ifdef __linux__ +#ifndef __solaris__ #include #include @@ -51,7 +51,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_NativeThread_init(JNIEnv *env, jclass cl) { -#ifdef __linux__ +#ifndef __solaris__ /* Install the null handler for INTERRUPT_SIGNAL. This might overwrite the * handler previously installed by java/net/linux_close.c, but that's okay @@ -74,7 +74,7 @@ JNIEXPORT jlong JNICALL Java_sun_nio_ch_NativeThread_current(JNIEnv *env, jclass cl) { -#ifdef __linux__ +#ifndef __solaris__ return (long)pthread_self(); #else return -1; @@ -84,7 +84,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_NativeThread_signal(JNIEnv *env, jclass cl, jlong thread) { -#ifdef __linux__ +#ifndef __solaris__ if (pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL)) JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed"); #endif