0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-10-23 12:54:08 +00:00
Files
termux-packages/packages/openjdk-21/0002-os_linux-add-android-checks-and-fixes.patch
alexytomi f1a75afe78 fix(openjdk-21): Readd deleted comments to commit message
Also regenerates for 21.0.8-ga
2025-07-23 00:33:24 -05:00

44 lines
1.4 KiB
Diff

From 88e6b658bd199afc082618a10c7b7dca50395021 Mon Sep 17 00:00:00 2001
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
Date: Sun, 6 Jun 2021 20:11:11 +0700
Subject: [PATCH 02/40] os_linux: add android checks and fixes
---
src/hotspot/os/linux/os_linux.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index bfd55895ab8..f5f1f02c0c1 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -141,7 +141,7 @@
// for timer info max values which include all bits
#define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF)
-#ifdef MUSL_LIBC
+#if defined(MUSL_LIBC) || defined(__ANDROID__)
// dlvsym is not a part of POSIX
// and musl libc doesn't implement it.
static void *dlvsym(void *handle,
@@ -580,6 +580,7 @@ void os::init_system_properties_values() {
// detecting pthread library
void os::Linux::libpthread_init() {
+#ifndef __ANDROID__
// Save glibc and pthread version strings.
#if !defined(_CS_GNU_LIBC_VERSION) || \
!defined(_CS_GNU_LIBPTHREAD_VERSION)
@@ -604,6 +605,9 @@ void os::Linux::libpthread_init() {
confstr(_CS_GNU_LIBPTHREAD_VERSION, str, n);
os::Linux::set_libpthread_version(str);
#endif
+#else
+ os::Linux::set_libpthread_version("NPTL");
+#endif
}
/////////////////////////////////////////////////////////////////////////////
--
2.50.1