--- libfakeroot.c
+++ libfakeroot.c
@@ -211,4 +211,6 @@
  #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){