This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
_res_init/_res and libpthread
- From: Thorsten Kukuk <kukuk at suse dot de>
- To: libc-alpha at sources dot redhat dot com
- Date: Fri, 7 Feb 2003 15:33:03 +0100
- Subject: _res_init/_res and libpthread
- Organization: SuSE Linux AG, Nuernberg, Germany
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