From d045a9b761c9e449b2ce377074b5427a2ec4b16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=A4sing?= Date: Sun, 2 Jun 2019 18:18:48 +0200 Subject: [PATCH] Allow `.ocx` as extension of native libraries on windows --- CHANGES.md | 1 + src/com/sun/jna/NativeLibrary.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 11b4eca758..c47d73d25c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,7 @@ Next release (5.4.0) Features -------- +* [#1097](https://github.com/java-native-access/jna/issues/1097): Allow `.ocx` as extension of native libraries on windows - [@dmigowski](https://github.com/dmigowski). Bug Fixes --------- diff --git a/src/com/sun/jna/NativeLibrary.java b/src/com/sun/jna/NativeLibrary.java index aafed5d9b9..46f653f6b4 100644 --- a/src/com/sun/jna/NativeLibrary.java +++ b/src/com/sun/jna/NativeLibrary.java @@ -776,7 +776,7 @@ else if (Platform.isAIX()) { // can be libx.a, libx.a(shr.o), libx.so } } else if (Platform.isWindows()) { - if (libName.endsWith(".drv") || libName.endsWith(".dll")) { + if (libName.endsWith(".drv") || libName.endsWith(".dll") || libName.endsWith(".ocx")) { return libName; } }