mirror of
https://github.com/termux/termux-packages.git
synced 2024-12-04 18:45:52 +00:00
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From b04c40ca7b8a3c6cb29d9e0e965ec592148327a2 Mon Sep 17 00:00:00 2001
|
|
From: Duy Tran Khanh <40482367+khanhduytran0@users.noreply.github.com>
|
|
Date: Mon, 7 Jun 2021 06:27:26 +0700
|
|
Subject: [PATCH] Define sys gettid on arm and aarch64
|
|
|
|
---
|
|
src/hotspot/os/linux/os_linux.cpp | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
|
|
index e8e66887cd5a..08b27d2dbe22 100644
|
|
--- a/src/hotspot/os/linux/os_linux.cpp
|
|
+++ b/src/hotspot/os/linux/os_linux.cpp
|
|
@@ -322,11 +322,11 @@ bool os::have_special_privileges() {
|
|
|
|
|
|
#ifndef SYS_gettid
|
|
-// i386: 224, ia64: 1105, amd64: 186, sparc: 143
|
|
+// i386 & arm: 224, ia64: 1105, amd64: 186, sparc: 143, aarch64: 178
|
|
#ifdef __ia64__
|
|
#define SYS_gettid 1105
|
|
#else
|
|
- #ifdef __i386__
|
|
+ #if defined(__i386__) || defined(__arm__)
|
|
#define SYS_gettid 224
|
|
#else
|
|
#ifdef __amd64__
|
|
@@ -334,6 +334,8 @@ bool os::have_special_privileges() {
|
|
#else
|
|
#ifdef __sparc__
|
|
#define SYS_gettid 143
|
|
+ #elif defined(__arm64__) || defined(__aarch64__)
|
|
+ #define SYS_gettid 178
|
|
#else
|
|
#error define gettid for the arch
|
|
#endif
|
|
--
|
|
2.44.0
|
|
|