From: Michael Olbrich Date: Tue, 6 Sep 2016 13:04:27 +0200 Subject: [PATCH] hide-dlsym-error Imported from fakeroot_1.21-2.debian.tar.xz Signed-off-by: Michael Olbrich --- libfakeroot.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libfakeroot.c b/libfakeroot.c index 4fd620f8a5f0..ca7494a97263 100644 --- a/libfakeroot.c +++ b/libfakeroot.c @@ -256,10 +256,16 @@ void load_library_symbols(void){ /* 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); -/* abort ();*/ +#ifdef LIBFAKEROOT_DEBUGGING + if (fakeroot_debug) { + fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); +/* abort ();*/ + } +#endif } + } }