From 36394b5ecddedd5963d21577614b813d044bc6be Mon Sep 17 00:00:00 2001 From: Pepijn Van Eeckhoudt Date: Fri, 13 Oct 2023 11:41:07 +0200 Subject: [PATCH] Allow detection of 64-bit libraries on Linux/aarch64 Adjust the filter in Platform.Linux to also correctly choose between 32/64-bit libraries on aarch64. --- src/main/java/jnr/ffi/Platform.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/jnr/ffi/Platform.java b/src/main/java/jnr/ffi/Platform.java index ab1d2cfd..f89761c9 100644 --- a/src/main/java/jnr/ffi/Platform.java +++ b/src/main/java/jnr/ffi/Platform.java @@ -783,7 +783,7 @@ private List getMatches(String libName, List libraryPaths) { Pattern exclude; // there are /libx32 directories in wild on ubuntu 14.04 and the // oracle-java8-installer package - if (getCPU() == CPU.X86_64) { + if (getCPU() == CPU.X86_64 || getCPU() == CPU.AARCH64) { exclude = Pattern.compile(".*(lib[a-z]*32|i[0-9]86).*"); // ignore 32 bit libs on 64-bit } else { exclude = Pattern.compile(".*(lib[a-z]*64|amd64|x86_64).*"); // ignore 64 bit libs on 32-bit