From c221c5094439136f46f34e398f2908ca9b5bfb1d Mon Sep 17 00:00:00 2001 From: guenther <> Date: Sun, 13 Sep 2015 21:36:08 +0000 Subject: Wrap and so that calls go direct and the symbols without underbar prefix are all weak --- src/lib/libc/net/inet_addr.c | 3 ++- src/lib/libc/net/inet_network.c | 3 ++- src/lib/libc/net/inet_ntop.c | 3 ++- src/lib/libc/net/inet_pton.c | 3 ++- src/lib/libc/net/res_comp.c | 4 +++- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/lib/libc/net/inet_addr.c b/src/lib/libc/net/inet_addr.c index 2c9aa3051b..62d46ad664 100644 --- a/src/lib/libc/net/inet_addr.c +++ b/src/lib/libc/net/inet_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_addr.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: inet_addr.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */ /* * ++Copyright++ 1983, 1990, 1993 @@ -172,3 +172,4 @@ inet_aton(const char *cp, struct in_addr *addr) addr->s_addr = htonl(val); return (1); } +DEF_WEAK(inet_aton); diff --git a/src/lib/libc/net/inet_network.c b/src/lib/libc/net/inet_network.c index ecf554e4f9..ef8f21b280 100644 --- a/src/lib/libc/net/inet_network.c +++ b/src/lib/libc/net/inet_network.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_network.c,v 1.11 2013/11/25 17:29:19 deraadt Exp $ */ +/* $OpenBSD: inet_network.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -82,3 +82,4 @@ again: } return (val); } +DEF_WEAK(inet_network); diff --git a/src/lib/libc/net/inet_ntop.c b/src/lib/libc/net/inet_ntop.c index 722761e2ed..f44dd08022 100644 --- a/src/lib/libc/net/inet_ntop.c +++ b/src/lib/libc/net/inet_ntop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_ntop.c,v 1.11 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: inet_ntop.c,v 1.12 2015/09/13 21:36:08 guenther Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -55,6 +55,7 @@ inet_ntop(int af, const void *src, char *dst, socklen_t size) } /* NOTREACHED */ } +DEF_WEAK(inet_ntop); /* const char * * inet_ntop4(src, dst, size) diff --git a/src/lib/libc/net/inet_pton.c b/src/lib/libc/net/inet_pton.c index f8e299b7b8..5d7148e8e9 100644 --- a/src/lib/libc/net/inet_pton.c +++ b/src/lib/libc/net/inet_pton.c @@ -1,4 +1,4 @@ -/* $OpenBSD: inet_pton.c,v 1.9 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: inet_pton.c,v 1.10 2015/09/13 21:36:08 guenther Exp $ */ /* Copyright (c) 1996 by Internet Software Consortium. * @@ -57,6 +57,7 @@ inet_pton(int af, const char *src, void *dst) } /* NOTREACHED */ } +DEF_WEAK(inet_pton); /* int * inet_pton4(src, dst) diff --git a/src/lib/libc/net/res_comp.c b/src/lib/libc/net/res_comp.c index a1467c3dbb..f6f987eb0e 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.16 2015/01/16 18:18:58 millert Exp $ */ +/* $OpenBSD: res_comp.c,v 1.17 2015/09/13 21:36:08 guenther Exp $ */ /* * ++Copyright++ 1985, 1993 @@ -440,6 +440,7 @@ _getshort(const u_char *msgp) GETSHORT(u, msgp); return (u); } +DEF_STRONG(_getshort); #ifdef NeXT /* @@ -461,6 +462,7 @@ _getlong(const u_char *msgp) GETLONG(u, msgp); return (u); } +DEF_STRONG(_getlong); void __putshort(u_int16_t s, u_char *msgp) -- cgit v1.2.3-55-g6feb