0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-05-11 20:13:22 +00:00
Files
termux-packages/packages/openjdk-17/0030-os-linux-use-getpagesize-instad-of-SHMLBA.patch
Robert Kirkman 4b5aa04efa bump(main/openjdk-17): 17.0.15
- fixes https://github.com/termux/termux-packages/issues/24527

- enable `littlecms`

- change `TERMUX_PKG_SRCURL` to match the same format as `openjdk-21`

- enable auto update

- add `--with-vendor-name="Termux"` and strip extra version strings like `openjdk-21`

- enable `TERMUX_PKG_MAKE_PROCESSES`

- remove directory before installation to fix building the same architecture twice in the same docker container

- some patches are present in the new upstream repository or are unnecessary

- some patches copied from `openjdk-21` because the code associated with them appeared in the new upstream repository
2025-05-07 07:29:19 +03:00

36 lines
1.3 KiB
Diff

From d8ac751229b8d4795a04f1d8ec08d03d8916b5f9 Mon Sep 17 00:00:00 2001
From: Henrik Grimler <grimler@termux.dev>
Date: Sun, 5 Feb 2023 09:21:57 +0100
Subject: [PATCH] os: linux: use getpagesize() instad of SHMLBA
Since the latter is not defined on android.
---
src/hotspot/os/linux/os_linux.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
index 06a5d0bf8245..4a48a8a69f76 100644
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -3912,7 +3912,7 @@ void os::large_page_init() {
static char* shmat_with_alignment(int shmid, size_t bytes, size_t alignment) {
assert(is_aligned(bytes, alignment), "Must be divisible by the alignment");
- if (!is_aligned(alignment, SHMLBA)) {
+ if (!is_aligned(alignment, getpagesize())) {
assert(false, "Code below assumes that alignment is at least SHMLBA aligned");
return NULL;
}
@@ -3948,7 +3948,7 @@ static char* shmat_with_alignment(int shmid, size_t bytes, size_t alignment) {
}
static char* shmat_at_address(int shmid, char* req_addr) {
- if (!is_aligned(req_addr, SHMLBA)) {
+ if (!is_aligned(req_addr, getpagesize())) {
assert(false, "Requested address needs to be SHMLBA aligned");
return NULL;
}
--
2.44.0