jurt/com/sun/star/lib/util/NativeLibraryLoader.java |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit d386b1dacf8802521eb5c385c63ee7666f112e1b
Author: Jürgen Schmidt <[email protected]>
Date:   Wed Feb 26 07:32:47 2014 +0000

    #124315# insert check for libs with jnilib extension on mac os

diff --git a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java 
b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
index d896c09..9bec01a 100644
--- a/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
+++ b/jurt/com/sun/star/lib/util/NativeLibraryLoader.java
@@ -48,8 +48,18 @@ public final class NativeLibraryLoader {
         library name is system dependent
      */
     public static void loadLibrary(ClassLoader loader, String libname) {
+        String syslibname = System.mapLibraryName(libname);
+
         File path = getResource(loader, System.mapLibraryName(libname));
         if (path == null) {
+            // check special jni lib extension on Mac
+            if (syslibname.contains("dylib")) {
+                syslibname = syslibname.replace("dylib", "jnilib");
+            }
+            path = getResource(loader, syslibname);
+        }
+
+        if (path == null) {
             // If the library cannot be found as a class loader resource, try
             // the global System.loadLibrary as a last resort:
             System.loadLibrary(libname);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to