chunk 2: https://github.com/freebsd/freebsd-ports/blob/main/net/belle-sip/files/patch-src_dns_dns.c
Index: src/dns/dns.c
--- src/dns/dns.c.orig
+++ src/dns/dns.c
@@ -4188,9 +4188,11 @@ struct dns_resolv_conf *dns_resconf_local(int *error_)
 		if (error != ENOENT) goto error;
 	}
 
+#ifndef __OpenBSD__
 	if ((error = dns_nssconf_loadpath(resconf, "/etc/nsswitch.conf"))) {
 		if (error != ENOENT) goto error;
 	}
+#endif
 
 	return resconf;
 error:
@@ -4661,6 +4663,7 @@ int dns_resconf_loadfromresolv(struct dns_resolv_conf 
 	union res_sockaddr_union addresses[3];
 	int i, error, write_index;
 
+	memset(&res, 0, sizeof(res));
 	if ((error = res_ninit(&res))) {
 		return error;
 	}
@@ -8395,6 +8398,7 @@ static struct dns_resolv_conf *resconf(void) {
 		if (error) panic("%s: %s", path, dns_strerror(error));
 	}
 
+#ifndef __OpenBSD__
 	for (i = 0; i < MAIN.nssconf.count; i++) {
 		path = MAIN.nssconf.path[i];
 
@@ -8410,7 +8414,7 @@ static struct dns_resolv_conf *resconf(void) {
 		if (!(error = dns_nssconf_loadpath(resconf, path))) MAIN.nssconf.path[MAIN.nssconf.count++] = path;
 		else if (error != ENOENT) panic("%s: %s", path, dns_strerror(error));
 	}
-
+#endif
 	return resconf;
 } /* resconf() */
 
