diff --git a/CHANGES.md b/CHANGES.md index cc567970c..a05a5cec4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -23,6 +23,7 @@ Bug Fixes * [#1722](https://github.com/java-native-access/jna/pull/1722): Fix `Advapi32#RegisterServiceCtrlHandler` using wrong `Handler` type - [@dbwiddis](https://github.com/dbwiddis). * [#1636](https://github.com/java-native-access/jna/issues/1636): Drop hard dependency on java.lang.SecurityManager/java.security.AccessController - [@matthiasblaesing](https://github.com/matthiasblaesing). * [#1724](https://github.com/java-native-access/jna/pull/1724): Fix `host_page_size` in `c.s.j.p.mac.SystemB` and `getxattr`/`setxattr`/`listxattr` in `c.s.j.p.mac.XAttr` using `long` instead of pointer-sized types for `size_t`/`ssize_t` parameters - [@dbwiddis](https://github.com/dbwiddis). +* [#1727](https://github.com/java-native-access/jna/pull/1727): Include DragonFlyBSD in `NativeLibrary` versioned library resolution, libc special-case loading, and 64-bit search paths - [@dbwiddis](https://github.com/dbwiddis). Release 5.18.1 ============== diff --git a/src/com/sun/jna/NativeLibrary.java b/src/com/sun/jna/NativeLibrary.java index ea5278b9b..10d440040 100644 --- a/src/com/sun/jna/NativeLibrary.java +++ b/src/com/sun/jna/NativeLibrary.java @@ -245,7 +245,7 @@ private static NativeLibrary loadLibrary(final String libraryName, final Map // Use current process to load libraries we know are already // loaded by the VM to ensure we get the correct version - if ((Platform.isLinux() || Platform.isFreeBSD() || Platform.isAIX()) + if ((Platform.isLinux() || Platform.isFreeBSD() || Platform.isDragonFlyBSD() || Platform.isAIX()) && Platform.C_LIBRARY_NAME.equals(libraryName)) { libraryName = null; } @@ -788,7 +788,7 @@ static String mapSharedLibraryName(String libName) { } return name; } - else if (Platform.isLinux() || Platform.isFreeBSD()) { + else if (Platform.isLinux() || Platform.isFreeBSD() || Platform.isDragonFlyBSD()) { if (isVersionedName(libName) || libName.endsWith(".so")) { // A specific version was requested - use as is for search return libName; @@ -926,8 +926,8 @@ static double parseVersion(String ver) { // one when running a 64bit JVM. // if (Platform.isLinux() || Platform.isSolaris() - || Platform.isFreeBSD() || Platform.iskFreeBSD()) { - // Linux & FreeBSD use /usr/lib32, solaris uses /usr/lib/32 + || Platform.isFreeBSD() || Platform.isDragonFlyBSD() || Platform.iskFreeBSD()) { + // Linux, FreeBSD & DragonFlyBSD use /usr/lib32, solaris uses /usr/lib/32 archPath = (Platform.isSolaris() ? "/" : "") + Native.POINTER_SIZE * 8; } String[] paths = {