diff options
Diffstat (limited to 'mail/dovecot-devel/files/patch-src_lib_module-dir.c')
-rw-r--r-- | mail/dovecot-devel/files/patch-src_lib_module-dir.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/mail/dovecot-devel/files/patch-src_lib_module-dir.c b/mail/dovecot-devel/files/patch-src_lib_module-dir.c new file mode 100644 index 000000000000..4badfa261402 --- /dev/null +++ b/mail/dovecot-devel/files/patch-src_lib_module-dir.c @@ -0,0 +1,27 @@ +--- src/lib/module-dir.c.orig 5 May 2006 14:21:22 -0000 1.19 ++++ src/lib/module-dir.c 16 Jun 2006 10:15:56 -0000 1.20 +@@ -24,14 +24,18 @@ + const char *error; + void *ret; + ++ /* clear out old errors */ ++ (void)dlerror(); ++ + /* get our init func */ + ret = dlsym(module->handle, symbol); +- +- error = dlerror(); +- if (error != NULL) { +- i_error("module %s: dlsym(%s) failed: %s", +- module->path, symbol, error); +- ret = NULL; ++ if (ret == NULL) { ++ error = dlerror(); ++ if (error != NULL) { ++ i_error("module %s: dlsym(%s) failed: %s", ++ module->path, symbol, error); ++ ret = NULL; ++ } + } + + return ret; |