File: 04-load-native-code-from-fs.patch

package info (click to toggle)
libjna-java 3.2.7-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,520 kB
  • sloc: java: 27,015; ansic: 3,782; xml: 694; sh: 421; makefile: 231
file content (15 lines) | stat: -rw-r--r-- 632 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Subject: try to load native library from /usr/lib/jni if system
 property jna.boot.library.path is not set
Author: Jan Dittberner <jandd@debian.org>
--- a/src/com/sun/jna/Native.java
+++ b/src/com/sun/jna/Native.java
@@ -648,6 +648,9 @@
     private static void loadNativeLibrary() {
         String libName = "jnidispatch";
         String bootPath = System.getProperty("jna.boot.library.path");
+        if (bootPath == null) {
+            bootPath = "/usr/lib/jni";
+        }
         if (bootPath != null) {
             String[] dirs = bootPath.split(File.pathSeparator);
             for (int i = 0; i < dirs.length; ++i) {