3fd34c8778fad5c6bd14b5d9abbbc820eb2780cc
[openwrt/staging/nbd.git] / tools / fakeroot / patches / 200-hide-dlsym-error.patch
1 Description: Hide error from dlsym()
2 dlsym(), starting in glibc 2.24 actually reports errors. In our case,
3 we try to get ACL functions which are not in the glibc. This causes
4 failures in test suites, so hide those messages for non-debugging
5 purposes for now. It also makes the build logs annoying to read.
6 Author: Julian Andres Klode <juliank@ubuntu.com>
7 Origin: vendor
8 Bug-Debian: https://bugs.debian.org/830912
9 Forwarded: no
10 Last-Update: 2016-08-12
11
12 --- a/libfakeroot.c
13 +++ b/libfakeroot.c
14 @@ -256,10 +256,16 @@ void load_library_symbols(void){
15 /* clear dlerror() just in case dlsym() legitimately returns NULL */
16 msg = dlerror();
17 *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
18 +
19 if ( (msg = dlerror()) != NULL){
20 - fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
21 -/* abort ();*/
22 +#ifdef LIBFAKEROOT_DEBUGGING
23 + if (fakeroot_debug) {
24 + fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
25 +/* abort ();*/
26 + }
27 +#endif
28 }
29 +
30 }
31 }
32