From: Stephen D. <sd...@gm...> - 2005-10-08 21:22:13
|
On 10/8/05, Zoran Vasiljevic <zv...@ar...> wrote: > No luck: this (NetBSD) system does not have any MT-safe call. > What I did: > > During the configure I emit the warning if compiling under Darwin. > > checking for getaddrinfo in -lsocket... no > checking for getnameinfo in -lsocket... no > checking for getaddrinfo... yes > checking for getnameinfo... yes > checking for gethostbyname_r... no > checking for gethostbyaddr_r... no > configure: WARNING: DNS queries will use non-threadsafe calls which > could result in server instability > > In dns.c I added > > #ifdef __APPLE__ > Ns_Cs cs; > Ns_CsEnter(&cs); > ... > Ns_CsLeave(&cs); > #endif > > to cope with this *at least* within our own program. This does not > guarantee that this is MT-safe because any of the rest of the > system may call those calls anytime, hence we get problems anyways. This doesn't seem to work on my Linux system (Fedora Core 4): dns.c: In function 'GetHost': dns.c:264: error: 'struct sockaddr_in' has no member named 'sin_len' |