Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
==============
Expand Down
10 changes: 5 additions & 5 deletions src/com/sun/jna/NativeLibrary.java
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ private static NativeLibrary loadLibrary(final String libraryName, final Map<Str
exceptions.add(e2);
}
}
else if (Platform.isLinux() || Platform.isFreeBSD()) {
else if (Platform.isLinux() || Platform.isFreeBSD() || Platform.isDragonFlyBSD()) {
//
// Failed to load the library normally - try to match libfoo.so.*
//
Expand Down Expand Up @@ -465,7 +465,7 @@ public static final NativeLibrary getInstance(String libraryName, Map<String, ?>

// 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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 = {
Expand Down
Loading