diff options
author | jdp <jdp@FreeBSD.org> | 1998-09-02 00:53:17 +0000 |
---|---|---|
committer | jdp <jdp@FreeBSD.org> | 1998-09-02 00:53:17 +0000 |
commit | bf8ea8d3a710dfc5162591b386fb01dc0158ed55 (patch) | |
tree | 4d411d41ad33572e5e52a6db2adf230567f8a2a3 /lib/libc/net/nsap_addr.c | |
parent | 7accff6b6d70c80baecfc41ec16a3baa034526d3 (diff) | |
download | FreeBSD-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/nsap_addr.c')
-rw-r--r-- | lib/libc/net/nsap_addr.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/net/nsap_addr.c b/lib/libc/net/nsap_addr.c index 1db7dd7..714c2c9 100644 --- a/lib/libc/net/nsap_addr.c +++ b/lib/libc/net/nsap_addr.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$Id: nsap_addr.c,v 1.4 1997/02/22 15:00:27 peter Exp $"; +static char rcsid[] = "$Id: nsap_addr.c,v 1.5 1998/06/11 09:02:45 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -103,3 +103,12 @@ inet_nsap_ntoa(binlen, binary, ascii) *ascii = '\0'; return (start); } + +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include <arpa/inet.h>. + */ +#undef inet_nsap_addr +__weak_reference(__inet_nsap_addr, inet_nsap_addr); +#undef inet_nsap_ntoa +__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa); |