Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/android-openjdk-build-multiarch
Path: blob/buildjre8/patches/jdk8u_android_aarch32.diff
861 views
1
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
2
index d3a9f240..410693bf 100644
3
--- a/hotspot/src/os/linux/vm/os_linux.cpp
4
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
5
@@ -95,13 +95,17 @@
6
# include <semaphore.h>
7
# include <fcntl.h>
8
# include <string.h>
9
-# include <syscall.h>
10
# include <sys/sysinfo.h>
11
-#ifndef __UCLIBC__
12
+#if !defined(__UCLIBC__) && !defined(__ANDROID__)
13
# include <gnu/libc-version.h>
14
#endif
15
# include <sys/ipc.h>
16
+#if !defined(__ANDROID__)
17
# include <sys/shm.h>
18
+# include <syscall.h>
19
+#else
20
+# include <sys/syscall.h>
21
+#endif
22
# include <link.h>
23
# include <stdint.h>
24
# include <inttypes.h>
25
@@ -3046,7 +3050,7 @@ extern "C" JNIEXPORT int fork1() { return fork(); }
26
// Handle request to load libnuma symbol version 1.1 (API v1). If it fails
27
// load symbol from base version instead.
28
void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
29
-#ifndef __UCLIBC__
30
+#if !defined(__UCLIBC__) && !defined(__ANDROID__)
31
void *f = dlvsym(handle, name, "libnuma_1.1");
32
if (f == NULL) {
33
f = dlsym(handle, name);
34
@@ -5976,7 +5980,7 @@ bool os::is_thread_cpu_time_supported() {
35
// Linux doesn't yet have a (official) notion of processor sets,
36
// so just return the system wide load average.
37
int os::loadavg(double loadavg[], int nelem) {
38
-#ifndef __UCLIBC__
39
+#if !defined(__UCLIBC__) && !defined(__ANDROID__)
40
return ::getloadavg(loadavg, nelem);
41
#else
42
return -1;
43
diff --git a/hotspot/src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp b/hotspot/src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp
44
index 2883fc17..0292a17f 100644
45
--- a/hotspot/src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp
46
+++ b/hotspot/src/os_cpu/linux_aarch32/vm/os_linux_aarch32.cpp
47
@@ -75,7 +75,9 @@
48
# include <pwd.h>
49
# include <poll.h>
50
# include <ucontext.h>
51
+#ifndef __ANDROID__
52
# include <fpu_control.h>
53
+#endif
54
55
#define REG_FP 29
56
#define SPELL_REG_SP "sp"
57
58