$OpenBSD: patch-nspr_pr_src_misc_prnetdb_c,v 1.5 2018/09/06 18:35:27 landry Exp $
Index: nspr/pr/src/misc/prnetdb.c
--- nspr/pr/src/misc/prnetdb.c.orig
+++ nspr/pr/src/misc/prnetdb.c
@@ -2048,7 +2048,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;
