This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

_res_init/_res and libpthread


Hi,

With current glibc (compiled without TLS support and without nptl),
the following test program does not work if I link it against
libpthread. If I don't link it against libpthread, it works fine:

kukuk@E113:~/tmp> gcc res_init.c -o res_init
kukuk@E113:~/tmp> ./res_init 
count 3
kukuk@E113:~/tmp> gcc res_init.c -o res_init -lpthread
kukuk@E113:~/tmp> ./res_init 
count 0

Any ideas why _res does not work any longer?

#include <netinet/in.h>
#include <arpa/nameser.h>
#include <resolv.h>

#include <stdio.h>

main(){
 res_init();

 printf("count %i\n", _res.nscount );

}

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE Linux AG        Deutschherrnstr. 15-19        D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]