aboutsummaryrefslogtreecommitdiffstats
path: root/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/openjdk6/icedtea-hotspot-uclibc-fixes.patch')
-rw-r--r--main/openjdk6/icedtea-hotspot-uclibc-fixes.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch b/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch
new file mode 100644
index 0000000000..fb75ffc340
--- /dev/null
+++ b/main/openjdk6/icedtea-hotspot-uclibc-fixes.patch
@@ -0,0 +1,90 @@
+--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -53,7 +53,6 @@
+ # include <string.h>
+ # include <syscall.h>
+ # include <sys/sysinfo.h>
+-# include <gnu/libc-version.h>
+ # include <sys/ipc.h>
+ # include <sys/shm.h>
+ # include <link.h>
+@@ -553,9 +552,7 @@
+ os::Linux::set_glibc_version(str);
+ } else {
+ // _CS_GNU_LIBC_VERSION is not supported, try gnu_get_libc_version()
+- static char _gnu_libc_version[32];
+- jio_snprintf(_gnu_libc_version, sizeof(_gnu_libc_version),
+- "glibc %s %s", gnu_get_libc_version(), gnu_get_libc_release());
++ static char _gnu_libc_version[32] = "2.9";
+ os::Linux::set_glibc_version(_gnu_libc_version);
+ }
+
+@@ -2434,11 +2431,7 @@
+ // If we are running with earlier version, which did not have symbol versions,
+ // we should use the base version.
+ void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
+- void *f = dlvsym(handle, name, "libnuma_1.1");
+- if (f == NULL) {
+- f = dlsym(handle, name);
+- }
+- return f;
++ return dlsym(handle, name);
+ }
+
+ bool os::Linux::libnuma_init() {
+@@ -4446,7 +4439,22 @@
+ // Linux doesn't yet have a (official) notion of processor sets,
+ // so just return the system wide load average.
+ int os::loadavg(double loadavg[], int nelem) {
+- return ::getloadavg(loadavg, nelem);
++
++ FILE *LOADAVG;
++ double avg[3] = { 0.0, 0.0, 0.0 };
++ int i, res = -1;;
++
++ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
++ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
++ res = 0;
++ fclose(LOADAVG);
++ }
++
++ for (i = 0; (i < nelem) && (i < 3); i++) {
++ loadavg[i] = avg[i];
++ }
++
++ return res;
+ }
+
+ void os::pause() {
+Only in openjdk: hotspot/src/os/linux/vm/os_linux.cpp.orig
+--- openjdk.orig/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp
+@@ -231,14 +231,14 @@
+ // checking for nanness
+ #ifdef SOLARIS
+ #ifdef SPARC
+-inline int g_isnan(float f) { return isnanf(f); }
++inline int g_isnan(float f) { return __isnanf(f); }
+ #else
+ // isnanf() broken on Intel Solaris use isnand()
+ inline int g_isnan(float f) { return isnand(f); }
+ #endif
+ inline int g_isnan(double f) { return isnand(f); }
+ #elif LINUX
+-inline int g_isnan(float f) { return isnanf(f); }
++inline int g_isnan(float f) { return __isnanf(f); }
+ inline int g_isnan(double f) { return isnan(f); }
+ #else
+ #error "missing platform-specific definition here"
+@@ -252,8 +252,8 @@
+
+ // Checking for finiteness
+
+-inline int g_isfinite(jfloat f) { return finite(f); }
+-inline int g_isfinite(jdouble f) { return finite(f); }
++inline int g_isfinite(jfloat f) { return isfinite(f); }
++inline int g_isfinite(jdouble f) { return isfinite(f); }
+
+
+ // Wide characters
+Only in openjdk: hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig