$OpenBSD: patch-nspr_pr_src_misc_prnetdb_c,v 1.6 2019/08/28 13:38:14 landry Exp $
Index: nspr/pr/src/misc/prnetdb.c
--- nspr/pr/src/misc/prnetdb.c.orig
+++ nspr/pr/src/misc/prnetdb.c
@@ -2013,7 +2013,9 @@ PR_IMPLEMENT(PRAddrInfo *) PR_GetAddrInfoByName(const 
          */
         hints.ai_socktype = SOCK_STREAM;
 
+	LOCK_DNS();
         rv = GETADDRINFO(hostname, NULL, &hints, &res);
+	UNLOCK_DNS();
 #ifdef AI_ADDRCONFIG
         if (rv == EAI_BADFLAGS && (hints.ai_flags & AI_ADDRCONFIG)) {
             hints.ai_flags &= ~AI_ADDRCONFIG;
