gentoo-bootstrap/dev-java/openjdk/files/openjdk9-os_linux-remove-gl...

41 lines
1.3 KiB
Diff

--- a/src/os/linux/vm/os_linux.orig 2020-07-19 13:28:52.744716037 +0000
+++ b/src/os/linux/vm/os_linux.cpp 2020-07-19 13:31:44.582341353 +0000
@@ -98,7 +98,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>
@@ -496,6 +495,11 @@
// detecting pthread library
void os::Linux::libpthread_init() {
+#if 1
+ // Hard code supported musl compatible settings (taken from alpine linux)
+ os::Linux::set_glibc_version("glibc 2.9");
+ os::Linux::set_libpthread_version("NPTL");
+#else
// Save glibc and pthread version strings.
#if !defined(_CS_GNU_LIBC_VERSION) || \
!defined(_CS_GNU_LIBPTHREAD_VERSION)
@@ -513,6 +519,7 @@
str = (char *)malloc(n, mtInternal);
confstr(_CS_GNU_LIBPTHREAD_VERSION, str, n);
os::Linux::set_libpthread_version(str);
+#endif
}
/////////////////////////////////////////////////////////////////////////////
@@ -2799,6 +2806,9 @@
return (retval == -1) ? retval : cpu;
}
+// musl doesn't have dlvsym()
+#define dlvsym(h,s,v) dlsym(h,s)
+
// Something to do with the numa-aware allocator needs these symbols
extern "C" JNIEXPORT void numa_warn(int number, char *where, ...) { }
extern "C" JNIEXPORT void numa_error(char *where) { }