_res_init/_res and libpthread
Thorsten Kukuk
kukuk@suse.de
Fri Feb 7 14:33:00 GMT 2003
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
More information about the Libc-alpha
mailing list