$NetBSD: patch-ad,v 1.2 2006/02/02 05:51:14 ben Exp $ --- ../pr/src/misc/prnetdb.c.orig 2006-02-01 20:04:26.000000000 +1300 +++ ../pr/src/misc/prnetdb.c 2006-02-01 20:05:53.000000000 +1300 @@ -2110,7 +2110,17 @@ */ hints.ai_socktype = SOCK_STREAM; +/* NetBSD >= 2.99.9 has a thread-safe resolver */ +#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900 + LOCK_DNS(); +#endif + rv = GETADDRINFO(hostname, NULL, &hints, &res); + +#if defined(__NetBSD_Version__) && __NetBSD_Version__ < 299000900 + UNLOCK_DNS(); +#endif + if (rv == 0) return (PRAddrInfo *) res;