Skip to content

Commit

Permalink
Allow detection of 64-bit libraries on Linux/aarch64
Browse files Browse the repository at this point in the history
Adjust the filter in Platform.Linux to also correctly choose between 32/64-bit libraries on aarch64.
  • Loading branch information
pepijnve authored Oct 13, 2023
1 parent 0deaac0 commit 36394b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/jnr/ffi/Platform.java
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ private List<Match> getMatches(String libName, List<String> 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
Expand Down

0 comments on commit 36394b5

Please sign in to comment.