From 032edac53b7a78f1599cf9dd1a76753373d5e0cd Mon Sep 17 00:00:00 2001 From: 18855466553 Date: Thu, 25 Apr 2024 16:20:13 +0800 Subject: [PATCH] I9JLVR: add downgrade the glibc symbol of fcntl --- add-downgrade-the-glibc-symbol-of-fcntl.patch | 27 +++++++++++++++++++ openjdk-21.spec | 7 ++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 add-downgrade-the-glibc-symbol-of-fcntl.patch diff --git a/add-downgrade-the-glibc-symbol-of-fcntl.patch b/add-downgrade-the-glibc-symbol-of-fcntl.patch new file mode 100644 index 0000000..285d9ac --- /dev/null +++ b/add-downgrade-the-glibc-symbol-of-fcntl.patch @@ -0,0 +1,27 @@ +Subject: add downgrade the glibc symbol of fcntl + +--- + src/hotspot/os/linux/os_linux.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp +index aa8be1d89..0aa9b57d8 100644 +--- a/src/hotspot/os/linux/os_linux.cpp ++++ b/src/hotspot/os/linux/os_linux.cpp +@@ -127,6 +127,13 @@ + #include + #endif + ++#if defined(AARCH64) ++ __asm__(".symver fcntl64,fcntl@GLIBC_2.17"); ++#elif defined(AMD64) ++ __asm__(".symver fcntl64,fcntl@GLIBC_2.2.5"); ++#endif ++ ++ + // if RUSAGE_THREAD for getrusage() has not been defined, do it here. The code calling + // getrusage() is prepared to handle the associated failure. + #ifndef RUSAGE_THREAD +-- +2.19.1 + diff --git a/openjdk-21.spec b/openjdk-21.spec index a6ae890..e7b0312 100644 --- a/openjdk-21.spec +++ b/openjdk-21.spec @@ -897,7 +897,7 @@ Name: java-21-%{origin} Version: %{newjavaver}.%{buildver} # This package needs `.rolling` as part of Release so as to not conflict on install with # java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as -Release: 0 +Release: 1 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages @@ -977,6 +977,7 @@ Patch2: rh1648644-java_access_bridge_privileged_security.patch # 21.0.1 Patch7: add-downgrade-the-glibc-symver-of-log2f-posix_spawn.patch Patch8: add-downgrade-the-glibc-symver-of-memcpy.patch +Patch9: add-downgrade-the-glibc-symbol-of-fcntl.patch ############################################ # @@ -1217,6 +1218,7 @@ pushd %{top_level_dir_name} %patch2 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 popd # openjdk %endif @@ -1792,6 +1794,9 @@ cjc.mainProgram(arg) %changelog +* Thu Apr 25 2024 kuenking111 - 1:21.0.3.9-1 +- add add-downgrade-the-glibc-symbol-of-fcntl.patch + * Mon Apr 22 2024 kuenking111 - 1:21.0.3.9-0 - upgrade to jdk21.0.23-ga -- Gitee