diff options
author | jkim <jkim@FreeBSD.org> | 2014-06-28 02:41:19 +0800 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2014-06-28 02:41:19 +0800 |
commit | 9473a939ebf400eb9d830efb11e179c1729b50ce (patch) | |
tree | 78acdf13b054c006318a0d7df5f0a0fff9f941eb /java/openjdk8 | |
parent | bfe4d36661b5ffa406c81ed4a06006b7dd89a247 (diff) | |
download | freebsd-ports-gnome-9473a939ebf400eb9d830efb11e179c1729b50ce.tar.gz freebsd-ports-gnome-9473a939ebf400eb9d830efb11e179c1729b50ce.tar.zst freebsd-ports-gnome-9473a939ebf400eb9d830efb11e179c1729b50ce.zip |
Implement current and signal methods for sun.nio.ch.NativeThread. Note this
fixes a test case in the following Apache Solr bug report.
https://issues.apache.org/jira/browse/SOLR-6204
Reported by: Dawid Weiss <dawid.weiss@gmail.com>
Diffstat (limited to 'java/openjdk8')
-rw-r--r-- | java/openjdk8/Makefile | 2 | ||||
-rw-r--r-- | java/openjdk8/files/patch-bsd | 51 |
2 files changed, 52 insertions, 1 deletions
diff --git a/java/openjdk8/Makefile b/java/openjdk8/Makefile index 8cf7e841fc77..dcb7a044f050 100644 --- a/java/openjdk8/Makefile +++ b/java/openjdk8/Makefile @@ -2,7 +2,7 @@ PORTNAME= openjdk PORTVERSION= ${JDK_MAJOR_VERSION}.${JDK_UPDATE_VERSION}.${JDK_BUILD_NUMBER:S/^0//} -PORTREVISION?= 7 +PORTREVISION?= 8 CATEGORIES= java devel MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/:jdk \ https://adopt-openjdk.ci.cloudbees.com/job/jtreg/${JTREG_JENKINS_BUILD}/artifact/:jtreg \ diff --git a/java/openjdk8/files/patch-bsd b/java/openjdk8/files/patch-bsd index 6876b4010bbb..66e37ef3b7e1 100644 --- a/java/openjdk8/files/patch-bsd +++ b/java/openjdk8/files/patch-bsd @@ -9882,6 +9882,57 @@ return -1; } +--- jdk/src/solaris/native/sun/nio/ch/NativeThread.c ++++ jdk/src/solaris/native/sun/nio/ch/NativeThread.c +@@ -33,12 +33,20 @@ + #include "nio_util.h" + + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) ++#if defined(__linux__) + #include <pthread.h> + #include <sys/signal.h> + + /* Also defined in src/solaris/native/java/net/linux_close.c */ + #define INTERRUPT_SIGNAL (__SIGRTMAX - 2) ++#else ++#include <pthread.h> ++#include <signal.h> ++ ++/* Also defined in src/solaris/native/java/net/bsd_close.c */ ++#define INTERRUPT_SIGNAL SIGIO ++#endif + + static void + nullHandler(int sig) +@@ -51,7 +59,7 @@ + JNIEXPORT void JNICALL + Java_sun_nio_ch_NativeThread_init(JNIEnv *env, jclass cl) + { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + + /* 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 +82,7 @@ + JNIEXPORT jlong JNICALL + Java_sun_nio_ch_NativeThread_current(JNIEnv *env, jclass cl) + { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + return (long)pthread_self(); + #else + return -1; +@@ -84,7 +92,7 @@ + JNIEXPORT void JNICALL + Java_sun_nio_ch_NativeThread_signal(JNIEnv *env, jclass cl, jlong thread) + { +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + if (pthread_kill((pthread_t)thread, INTERRUPT_SIGNAL)) + JNU_ThrowIOExceptionWithLastError(env, "Thread signal failed"); + #endif --- jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h +++ jdk/src/solaris/native/sun/nio/ch/sctp/Sctp.h @@ -67,7 +67,7 @@ |