summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/res_comp.c
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1998-09-02 00:53:17 +0000
committerjdp <jdp@FreeBSD.org>1998-09-02 00:53:17 +0000
commitbf8ea8d3a710dfc5162591b386fb01dc0158ed55 (patch)
tree4d411d41ad33572e5e52a6db2adf230567f8a2a3 /lib/libc/net/res_comp.c
parent7accff6b6d70c80baecfc41ec16a3baa034526d3 (diff)
downloadFreeBSD-src-bf8ea8d3a710dfc5162591b386fb01dc0158ed55.zip
FreeBSD-src-bf8ea8d3a710dfc5162591b386fb01dc0158ed55.tar.gz
Implement the weak aliases for private entry points in the inet_*
and res_* modules in a way that works for ELF. I moved the aliases out of res_stubs.c and into the individual modules where the entry points are defined. Weak aliases don't work in ELF unless that is the case. (Actually, I'm surprised it worked for a.out.) This should fix the undefined "inet_addr" and related symbols in various applications that fail to include <arpa/inet.h> or <resolv.h> as they are supposed to do.
Diffstat (limited to 'lib/libc/net/res_comp.c')
-rw-r--r--lib/libc/net/res_comp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/net/res_comp.c b/lib/libc/net/res_comp.c
index de14f07..a85e36d 100644
--- a/lib/libc/net/res_comp.c
+++ b/lib/libc/net/res_comp.c
@@ -71,7 +71,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
static char orig_rcsid[] = "From: Id: res_comp.c,v 8.11 1997/05/21 19:31:04 halley Exp $";
-static char rcsid[] = "$Id: res_comp.c,v 1.13 1998/05/02 13:10:56 peter Exp $";
+static char rcsid[] = "$Id: res_comp.c,v 1.14 1998/06/11 09:02:46 peter Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -256,3 +256,12 @@ void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
u_int32_t _getlong(const u_char *src) { return (ns_get32(src)); }
u_int16_t _getshort(const u_char *src) { return (ns_get16(src)); }
#endif /*BIND_4_COMPAT*/
+
+/*
+ * Weak aliases for applications that use certain private entry points,
+ * and fail to include <resolv.h>.
+ */
+#undef dn_comp
+__weak_reference(__dn_comp, dn_comp);
+#undef dn_expand
+__weak_reference(__dn_expand, dn_expand);
OpenPOWER on IntegriCloud