summaryrefslogtreecommitdiff
path: root/devel/glib2/patches/patch-ag
blob: f118adb6bbf8e3046a65f6cac4f6a1db0aff6174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ag,v 1.5 2005/01/06 09:07:06 itohy Exp $

--- gmodule/gmodule-dl.c.orig	Fri Feb 20 10:41:00 2004
+++ gmodule/gmodule-dl.c	Thu Jan  6 17:41:07 2005
@@ -140,10 +140,16 @@ _g_module_symbol (gpointer     handle,
 		  const gchar *symbol_name)
 {
   gpointer p;
+  const gchar *errstr;
   
   p = dlsym (handle, symbol_name);
   if (!p)
-    g_module_set_error (fetch_dlerror (FALSE));
+    {
+      errstr = fetch_dlerror (FALSE);
+      if (!errstr)
+	errstr = "symbol not found";
+      g_module_set_error (errstr);
+    }
   
   return p;
 }