aboutsummaryrefslogtreecommitdiff
path: root/java/openjdk7
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2014-06-27 18:41:19 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2014-06-27 18:41:19 +0000
commit6d8c62429cf9606827d2cf2925b9bf26a878a4b5 (patch)
tree78acdf13b054c006318a0d7df5f0a0fff9f941eb /java/openjdk7
parent2071a2004a16a796363c4ed98868932a386fe603 (diff)
downloadports-6d8c62429cf9606827d2cf2925b9bf26a878a4b5.tar.gz
ports-6d8c62429cf9606827d2cf2925b9bf26a878a4b5.zip
Notes
Diffstat (limited to 'java/openjdk7')
-rw-r--r--java/openjdk7/Makefile1
-rw-r--r--java/openjdk7/files/patch-src-solaris-native-sun-nio-ch-NativeThread.c51
2 files changed, 52 insertions, 0 deletions
diff --git a/java/openjdk7/Makefile b/java/openjdk7/Makefile
index fdff8396ac25..a7cfb239a21e 100644
--- a/java/openjdk7/Makefile
+++ b/java/openjdk7/Makefile
@@ -3,6 +3,7 @@
PORTNAME= openjdk
PORTVERSION= ${JDK_MAJOR_VERSION}.${PORT_MINOR_VERSION}.${PORT_BUILD_NUMBER}
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= java devel
MASTER_SITES= http://download.java.net/openjdk/jdk${JDK_MAJOR_VERSION}u${JDK_MINOR_VERSION}/promoted/b${JDK_BUILD_NUMBER}/ \
diff --git a/java/openjdk7/files/patch-src-solaris-native-sun-nio-ch-NativeThread.c b/java/openjdk7/files/patch-src-solaris-native-sun-nio-ch-NativeThread.c
new file mode 100644
index 000000000000..93216af25d73
--- /dev/null
+++ b/java/openjdk7/files/patch-src-solaris-native-sun-nio-ch-NativeThread.c
@@ -0,0 +1,51 @@
+--- 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