From 937fb10cda71821abf2daaa94e56a77f495091cf Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Mon, 13 May 2013 21:15:44 +0200 Subject: More FreeBSD/glibc vs Linux only fixups --- debian/patches/kfreebsd-support-hotspot.diff | 58 ++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) 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 +-#ifdef __linux__ ++#if defined(__linux__) || defined(__GLIBC__) + #include + #else + #include +--- 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()); -- cgit v1.2.3