aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2009-01-11 06:21:47 +0800
committerTor Lillqvist <tml@src.gnome.org>2009-01-11 06:21:47 +0800
commitdab08c513e7bf5f7c0f52c42ff245f940601b866 (patch)
treeffc3a915cebe64def324cf0b147dc731388e6337
parent165cb49d80b8c0d173e4adfee88283aa0bef3db1 (diff)
downloadgsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.tar
gsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.tar.gz
gsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.tar.bz2
gsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.tar.lz
gsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.tar.xz
gsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.tar.zst
gsoc2013-evolution-dab08c513e7bf5f7c0f52c42ff245f940601b866.zip
** Bug #567244
2009-01-11 Tor Lillqvist <tml@novell.com> ** Bug #567244 * filter-option.c (get_dynamic_options): For portability, use <gmodule.h> API instead of <dlfcn.h> API. svn path=/trunk/; revision=37029
-rw-r--r--filter/ChangeLog7
-rw-r--r--filter/filter-option.c11
2 files changed, 12 insertions, 6 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index 119cae2592..9402e27b98 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,10 @@
+2009-01-11 Tor Lillqvist <tml@novell.com>
+
+ ** Bug #567244
+
+ * filter-option.c (get_dynamic_options): For portability, use
+ <gmodule.h> API instead of <dlfcn.h> API.
+
2009-01-08 Milan Crha <mcrha@redhat.com>
** Fix for bug #567031
diff --git a/filter/filter-option.c b/filter/filter-option.c
index 2d79b609c9..0ec6dfeffb 100644
--- a/filter/filter-option.c
+++ b/filter/filter-option.c
@@ -29,7 +29,7 @@
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <dlfcn.h>
+#include <gmodule.h>
#include "filter-option.h"
#include "filter-part.h"
@@ -352,23 +352,22 @@ option_changed (GtkWidget *widget, FilterElement *fe)
static GSList *
get_dynamic_options (FilterOption *fo)
{
- void *module;
+ GModule *module;
GSList *(*get_func)(void);
GSList *res = NULL;
if (!fo || !fo->dynamic_func)
return res;
- module = dlopen (NULL, RTLD_LAZY);
+ module = g_module_open (NULL, G_MODULE_BIND_LAZY);
- get_func = dlsym (module, fo->dynamic_func);
- if (get_func) {
+ if (g_module_symbol (module, fo->dynamic_func, &get_func)) {
res = get_func ();
} else {
g_warning ("optionlist dynamic fill function '%s' not found", fo->dynamic_func);
}
- dlclose (module);
+ g_module_close (module);
return res;
}