From f97ab44d7b0a4185f9d2a463b1362407042c517f Mon Sep 17 00:00:00 2001
From: guenther <>
Date: Mon, 5 Oct 2015 02:57:16 +0000
Subject: Wrap <resolv.h> so that internal calls go direct

ok millert@
---
 src/lib/libc/net/res_comp.c       | 6 ++++--
 src/lib/libc/net/res_debug_syms.c | 5 ++++-
 src/lib/libc/net/res_random.c     | 5 +++--
 3 files changed, 11 insertions(+), 5 deletions(-)

(limited to 'src/lib')

diff --git a/src/lib/libc/net/res_comp.c b/src/lib/libc/net/res_comp.c
index f6f987eb0e..c493d9b20d 100644
--- a/src/lib/libc/net/res_comp.c
+++ b/src/lib/libc/net/res_comp.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: res_comp.c,v 1.17 2015/09/13 21:36:08 guenther Exp $	*/
+/*	$OpenBSD: res_comp.c,v 1.18 2015/10/05 02:57:16 guenther Exp $	*/
 
 /*
  * ++Copyright++ 1985, 1993
@@ -141,6 +141,7 @@ dn_expand(const u_char *msg, const u_char *eomorig, const u_char *comp_dn,
 		len = cp - comp_dn;
 	return (len);
 }
+DEF_WEAK(dn_expand);
 
 /*
  * Compress domain name 'exp_dn' into 'comp_dn'.
@@ -344,7 +345,7 @@ dn_find(u_char *exp_dn, u_char *msg, u_char **dnptrs, u_char **lastdnptr)
 #define	domainchar(c) ((c) > 0x20 && (c) < 0x7f)
 
 int
-res_hnok(const char *dn)
+__res_hnok(const char *dn)
 {
 	int pch = PERIOD, ch = *dn++;
 
@@ -367,6 +368,7 @@ res_hnok(const char *dn)
 	}
 	return (1);
 }
+DEF_STRONG(__res_hnok);
 
 /*
  * hostname-like (A, MX, WKS) owners can have "*" as their first label
diff --git a/src/lib/libc/net/res_debug_syms.c b/src/lib/libc/net/res_debug_syms.c
index 7e7d22c914..fc26f03e74 100644
--- a/src/lib/libc/net/res_debug_syms.c
+++ b/src/lib/libc/net/res_debug_syms.c
@@ -1,4 +1,4 @@
-/*	$OpenBSD: res_debug_syms.c,v 1.1 2005/08/06 20:30:04 espie Exp $	*/
+/*	$OpenBSD: res_debug_syms.c,v 1.2 2015/10/05 02:57:16 guenther Exp $	*/
 
 /*
  * ++Copyright++ 1985, 1990, 1993
@@ -168,6 +168,7 @@ __sym_ntos(const struct res_sym *syms, int number, int *success)
 		*success = 0;
 	return (unname);
 }
+DEF_STRONG(__sym_ntos);
 
 /*
  * Return a string for the type
@@ -177,6 +178,7 @@ __p_type(int type)
 {
 	return (__sym_ntos (__p_type_syms, type, (int *)0));
 }
+DEF_STRONG(__p_type);
 
 /*
  * Return a mnemonic for class
@@ -186,4 +188,5 @@ __p_class(int class)
 {
 	return (__sym_ntos (__p_class_syms, class, (int *)0));
 }
+DEF_STRONG(__p_class);
 
diff --git a/src/lib/libc/net/res_random.c b/src/lib/libc/net/res_random.c
index 394072c813..72b9c41a2a 100644
--- a/src/lib/libc/net/res_random.c
+++ b/src/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_random.c,v 1.22 2015/06/04 19:26:39 eric Exp $ */
+/* $OpenBSD: res_random.c,v 1.23 2015/10/05 02:57:16 guenther Exp $ */
 
 /*
  * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -225,7 +225,7 @@ res_initid(void)
 }
 
 u_int
-res_randomid(void)
+__res_randomid(void)
 {
 	struct timespec ts;
 	pid_t pid;
@@ -252,6 +252,7 @@ res_randomid(void)
 
 	return (r);
 }
+DEF_STRONG(__res_randomid);
 
 #if 0
 int
-- 
cgit v1.2.3-55-g6feb