summaryrefslogtreecommitdiff
path: root/src/Fl_Native_File_Chooser_GTK.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Fl_Native_File_Chooser_GTK.cxx')
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index 7b7fbe155..1b4751107 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -17,7 +17,9 @@
//
#include <FL/x.H>
+#if HAVE_DLSYM && HAVE_DLFCN_H
#include <dlfcn.h> // for dlopen et al
+#endif
#include <locale.h> // for setlocale
/* --------------------- Type definitions from GLIB and GTK --------------------- */
@@ -620,8 +622,9 @@ int Fl_GTK_File_Chooser::fl_gtk_chooser_wrapper()
return result;
} // fl_gtk_chooser_wrapper
+#if HAVE_DLSYM && HAVE_DLFCN_H
// macro to help with the symbol loading boilerplate...
-#define GET_SYM(SSS, LLL) \
+# define GET_SYM(SSS, LLL) \
dlerror(); /* Clear any existing error */ \
fl_##SSS = (XX_##SSS)dlsym(LLL, #SSS); \
if ((pc_dl_error = dlerror()) != NULL) { \
@@ -635,6 +638,7 @@ static void* fl_dlopen(const char *filename1, const char *filename2)
if (!ptr) ptr = dlopen(filename2, RTLD_LAZY | RTLD_GLOBAL);
return ptr;
}
+#endif
/*
* Use dlopen to see if we can load the gtk dynamic libraries that
@@ -642,6 +646,7 @@ static void* fl_dlopen(const char *filename1, const char *filename2)
* without linking to the GTK libs at compile time.
*/
void Fl_GTK_File_Chooser::probe_for_GTK_libs(void) {
+#if HAVE_DLSYM && HAVE_DLFCN_H
void *ptr_glib = NULL;
void *ptr_gtk = NULL;
@@ -719,6 +724,7 @@ void Fl_GTK_File_Chooser::probe_for_GTK_libs(void) {
GET_SYM(gtk_toggle_button_set_active, ptr_gtk);
did_find_GTK_libs = 1;
+#endif
} // probe_for_GTK_libs
//