[Fakeroot-commits] [SCM] fakeroot branch, master, updated. debian/1.14.3-12-g4bdead5

Clint Adams clint at gnu.org
Sat Feb 12 04:56:30 UTC 2011


The following commit has been merged in the master branch:
commit 89c9db2af74b2d49800953e7474925977549d616
Author: Clint Adams <clint at gnu.org>
Date:   Sun Dec 5 14:02:15 2010 -0500

    Clear dlerror() just in case dlsym() legitimately returns NULL, to prevent misleading errors on Nexenta.  Thanks to Pavel Strashkin.

diff --git a/libfakeroot.c b/libfakeroot.c
index 1b4f63b..adc37c1 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -206,6 +206,8 @@ void load_library_symbols(void){
 
 #endif /* LIBFAKEROOT_DEBUGGING */
   for(i=0; next_wrap[i].doit; i++){
+ /* clear dlerror() just in case dlsym() legitimately returns NULL */
+    msg = dlerror();
     *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
     if ( (msg = dlerror()) != NULL){
       fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);

-- 
fakeroot



More information about the Fakeroot-commits mailing list