From ee190a3368e0f8828abd5c23b9a3871e6b57db9b Mon Sep 17 00:00:00 2001 From: neu-mobi Date: Thu, 31 Oct 2024 15:06:25 +0800 Subject: [PATCH] downgrade fcntl64 to fcntl on linux --- downgrade-fcntl64-to-fcntl-on-linux.patch | 28 +++++++++++++++++++++++ openjdk-17.spec | 7 +++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 downgrade-fcntl64-to-fcntl-on-linux.patch diff --git a/downgrade-fcntl64-to-fcntl-on-linux.patch b/downgrade-fcntl64-to-fcntl-on-linux.patch new file mode 100644 index 0000000..2d20d52 --- /dev/null +++ b/downgrade-fcntl64-to-fcntl-on-linux.patch @@ -0,0 +1,28 @@ +From d01d6f1d2c4baeb238a850ccedc8b2ab1a926eb0 Mon Sep 17 00:00:00 2001 +Date: Thu, 31 Oct 2024 17:06:06 +0800 +Subject: downgrade fcntl64 to fcntl on linux + +--- + src/hotspot/os/linux/os_linux.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp +index e59af5504..96b92344f 100644 +--- a/src/hotspot/os/linux/os_linux.cpp ++++ b/src/hotspot/os/linux/os_linux.cpp +@@ -122,6 +122,12 @@ + #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.22.0 + diff --git a/openjdk-17.spec b/openjdk-17.spec index 0a708bc..dbd12aa 100644 --- a/openjdk-17.spec +++ b/openjdk-17.spec @@ -903,7 +903,7 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release} Name: java-%{javaver}-%{origin} Version: %{newjavaver}.%{buildver} -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 @@ -1039,6 +1039,7 @@ Patch66: Backport-of-8337712-Wrong-javadoc-in-java.util.Date-.patch #17.0.13 Patch67: Huawei-Fix-JBooster-file-issue-caused-by-os-write-change.patch +Patch68: downgrade-fcntl64-to-fcntl-on-linux.patch ############################################ # # LoongArch64 specific patches @@ -1321,6 +1322,7 @@ pushd %{top_level_dir_name} %patch65 -p1 %patch66 -p1 %patch67 -p1 +%patch68 -p1 popd # openjdk %endif @@ -1887,6 +1889,9 @@ cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect %changelog +* Thu Oct 31 2024 neu-mobi - 1:17.0.13.11-1 +- add downgrade-fcntl64-to-fcntl-on-linux.patch + * Wed Oct 16 2024 Benshuai5D - 1:17.0.13.11-0 - modify 8264805-Backport-Ahead-of-Time-Compiler.patch - modify 8264806-Backport-Graal-Compiler.patch -- Gitee