$OpenBSD: patch-nspr_pr_src_misc_prnetdb_c,v 1.8 2020/09/21 13:50:18 landry Exp $
Index: nspr/pr/src/misc/prnetdb.c
--- nspr/pr/src/misc/prnetdb.c.orig
+++ nspr/pr/src/misc/prnetdb.c
@@ -2161,7 +2161,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;
