aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-05-13 21:15:44 +0200
committerGuido Günther <agx@sigxcpu.org>2013-05-13 21:20:59 +0200
commit937fb10cda71821abf2daaa94e56a77f495091cf (patch)
tree47b6f96799e74a059ccf0b9fba3d7d360e8dca2e
parentc558d40e79e1a0d9ed3aca3cb2b62f4e1baae0f4 (diff)
More FreeBSD/glibc vs Linux only fixups
-rw-r--r--debian/patches/kfreebsd-support-hotspot.diff58
1 files changed, 58 insertions, 0 deletions
diff --git a/debian/patches/kfreebsd-support-hotspot.diff b/debian/patches/kfreebsd-support-hotspot.diff
index dfa103e..748ad35 100644
--- a/debian/patches/kfreebsd-support-hotspot.diff
+++ b/debian/patches/kfreebsd-support-hotspot.diff
@@ -955,3 +955,61 @@ index 58ef931..9448389 100644
// no precompiled headers
#include "assembler_x86.inline.hpp"
#include "classfile/classLoader.hpp"
+--- openjdk/jdk/src/solaris/bin/java_md_solinux.h.orig 2013-05-13 12:53:02.145315788 +0200
++++ openjdk/jdk/src/solaris/bin/java_md_solinux.h 2013-05-13 12:53:29.657604967 +0200
+@@ -45,7 +45,7 @@
+ * A collection of useful strings. One should think of these as #define
+ * entries, but actual strings can be more efficient (with many compilers).
+ */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ static const char *system_dir = "/usr/java";
+ static const char *user_dir = "/java";
+ #else /* Solaris */
+@@ -54,7 +54,7 @@
+ #endif
+
+ #include <dlfcn.h>
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ #include <pthread.h>
+ #else
+ #include <thread.h>
+--- openjdk/jdk/src/solaris/bin/java_md_solinux.c.orig 2013-05-13 17:14:31.953312685 +0200
++++ openjdk/jdk/src/solaris/bin/java_md_solinux.c 2013-05-13 17:18:01.426302853 +0200
+@@ -298,7 +298,7 @@
+ if (llp == NULL && dmllp == NULL) {
+ return JNI_FALSE;
+ }
+-#ifdef __linux
++#if defined(__linux) || defined(__GLIBC__)
+ /*
+ * On linux, if a binary is running as sgid or suid, glibc sets
+ * LD_LIBRARY_PATH to the empty string for security purposes. (In contrast,
+@@ -928,7 +928,7 @@
+ }
+ }
+ }
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__FreeBSD_kernel__)
+ {
+ const char* self = "/proc/self/exe";
+ char buf[PATH_MAX+1];
+@@ -982,7 +982,7 @@
+ int
+ ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
+ int rslt;
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ pthread_t tid;
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
+@@ -1027,7 +1027,7 @@
+
+ void SetJavaLauncherPlatformProps() {
+ /* Linux only */
+-#ifdef __linux__
++#if defined(__linux__) || defined(__GLIBC__)
+ const char *substr = "-Dsun.java.launcher.pid=";
+ char *pid_prop_str = (char *)JLI_MemAlloc(JLI_StrLen(substr) + MAX_PID_STR_SZ + 1);
+ sprintf(pid_prop_str, "%s%d", substr, getpid());