diff options
Diffstat (limited to 'lib/libc/inet/inet_network.c')
-rw-r--r-- | lib/libc/inet/inet_network.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lib/libc/inet/inet_network.c b/lib/libc/inet/inet_network.c index aaa50c8..9d417ac 100644 --- a/lib/libc/inet/inet_network.c +++ b/lib/libc/inet/inet_network.c @@ -34,6 +34,8 @@ #if defined(LIBC_SCCS) && !defined(lint) static const char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD$"); #include "port_before.h" @@ -49,14 +51,14 @@ static const char sccsid[] = "@(#)inet_network.c 8.1 (Berkeley) 6/4/93"; * The library routines call this routine to interpret * network numbers. */ -u_long +in_addr_t inet_network(cp) - register const char *cp; + const char *cp; { - register u_long val, base, n, i; - register char c; - u_long parts[4], *pp = parts; - int digit; + in_addr_t val, base, n; + char c; + in_addr_t parts[4], *pp = parts; + int i, digit; again: val = 0; base = 10; digit = 0; @@ -102,3 +104,10 @@ again: } return (val); } + +/* + * Weak aliases for applications that use certain private entry points, + * and fail to include <arpa/inet.h>. + */ +#undef inet_network +__weak_reference(__inet_network, inet_network); |