From 4bc4b884f02deaa9c9b14e3ccdda5e2f11f832fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=A4sing?= Date: Fri, 20 Sep 2019 22:39:53 +0200 Subject: [PATCH] Detect aarch64 as ARM and report it as a 64 bit architecture --- src/com/sun/jna/Platform.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/com/sun/jna/Platform.java b/src/com/sun/jna/Platform.java index 7323f17000..e3319e2c7c 100644 --- a/src/com/sun/jna/Platform.java +++ b/src/com/sun/jna/Platform.java @@ -194,7 +194,8 @@ public static final boolean is64Bit() { || "ppc64".equals(ARCH) || "ppc64le".equals(ARCH) || "sparcv9".equals(ARCH) || "mips64".equals(ARCH) || "mips64el".equals(ARCH) - || "amd64".equals(ARCH)) { + || "amd64".equals(ARCH) + || "aarch64".equals(ARCH)) { return true; } return Native.POINTER_SIZE == 8; @@ -215,7 +216,7 @@ public static final boolean isPPC() { } public static final boolean isARM() { - return ARCH.startsWith("arm"); + return ARCH.startsWith("arm") || ARCH.startsWith("aarch"); } public static final boolean isSPARC() {