[gnome-subtitles] Fixed a bug with ldlib or dlopen not being found in some distros



commit 7359d422b5b060f6800232a716ced59b071eb697
Author: Pedro Castro <pedro gnomesubtitles org>
Date:   Mon Nov 1 20:52:54 2021 +0000

    Fixed a bug with ldlib or dlopen not being found in some distros
    
    Fixes #185 Version 1.7 does not start on Fedora 35 beta
    Fixes #188 Version 1.7.1 causes an exception in Ubuntu 18.04

 src/External/Interop/Interop.cs                         | 6 +++---
 src/GnomeSubtitles/Execution/gnome-subtitles.exe.config | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/External/Interop/Interop.cs b/src/External/Interop/Interop.cs
index 6d26158..093a6d8 100644
--- a/src/External/Interop/Interop.cs
+++ b/src/External/Interop/Interop.cs
@@ -28,13 +28,13 @@ public class Interop {
 
        /* Function imports */
        
-       [DllImport("libc")]
+       [DllImport("libdl")]
        private static extern IntPtr dlopen (string filename, int flags);
        
-       [DllImport("libc")]
+       [DllImport("libdl")]
        private static extern IntPtr dlsym (IntPtr handle, string symbol);
        
-       [DllImport("libc")]
+       [DllImport("libdl")]
        private static extern int dlclose (IntPtr handl);
        
        
diff --git a/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config 
b/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
index 1241e27..ec9a6da 100644
--- a/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
+++ b/src/GnomeSubtitles/Execution/gnome-subtitles.exe.config
@@ -1,4 +1,5 @@
 <configuration>
        <dllmap dll="libgtk" target="libgtk-3.so.0" />
        <dllmap dll="libgtkspell" target="libgtkspell3-3.so.0" />
+       <dllmap dll="libdl" target="libdl.so.2" />
 </configuration>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]