diff options
author | David Robillard <d@drobilla.net> | 2020-09-27 16:16:15 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-09-27 16:16:15 +0200 |
commit | e5345ab3e4bad3ee929c0f08a9161b46fa6e2071 (patch) | |
tree | a2b5d9b32f3643e2a301680a1ef6f750d0993c0a /src/gtk2_in_qt5.cpp | |
parent | 0ab07d65fe9261ecfa495090691db324eff7aefc (diff) | |
download | suil-e5345ab3e4bad3ee929c0f08a9161b46fa6e2071.tar.gz suil-e5345ab3e4bad3ee929c0f08a9161b46fa6e2071.tar.bz2 suil-e5345ab3e4bad3ee929c0f08a9161b46fa6e2071.zip |
Add a less janky portability wrapper for dlopen() and friends
Diffstat (limited to 'src/gtk2_in_qt5.cpp')
-rw-r--r-- | src/gtk2_in_qt5.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gtk2_in_qt5.cpp b/src/gtk2_in_qt5.cpp index c4add29..f6bf48e 100644 --- a/src/gtk2_in_qt5.cpp +++ b/src/gtk2_in_qt5.cpp @@ -15,6 +15,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "dylib.h" #include "suil_config.h" #include "suil_internal.h" @@ -35,7 +36,6 @@ #include <gtk/gtk.h> #include <gobject/gclosure.h> -#include <dlfcn.h> #include <stdlib.h> extern "C" { @@ -138,11 +138,11 @@ suil_wrapper_new(SuilHost* host, type" errors. */ if (!host->gtk_lib) { - dlerror(); - host->gtk_lib = dlopen(SUIL_GTK2_LIB_NAME, RTLD_LAZY|RTLD_GLOBAL); + dylib_error(); + host->gtk_lib = dylib_open(SUIL_GTK2_LIB_NAME, DYLIB_LAZY|DYLIB_GLOBAL); if (!host->gtk_lib) { SUIL_ERRORF("Failed to open %s (%s)\n", - SUIL_GTK2_LIB_NAME, dlerror()); + SUIL_GTK2_LIB_NAME, dylib_error()); return NULL; } gtk_init(NULL, NULL); |