0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-13 03:00:31 +00:00
termux-packages/packages/openjdk-21/0002-os_linux-add-android-checks-and-fixes.patch
eval Nya 940a37f5f0 addpkg(main/openjdk-21): 21.0.3-ga
cherry-pick all patches, apply them on upstream JDK, and adapted for
newer $UPDATE version

fix: type redefinition introduced in 21.0.2
2024-10-17 14:02:06 +02:00

44 lines
1.4 KiB
Diff

From 30cf54273a90846f21289beeb495de12e59f0b60 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/37] 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 a77476e21..c76b6f90a 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -138,7 +138,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,
@@ -573,6 +573,7 @@ extern "C" void breakpoint() {
// 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)
@@ -597,6 +598,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.45.2