summaryrefslogtreecommitdiffstats
path: root/lib/libc/inet/inet_lnaof.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-03-21 15:37:16 +0000
committerume <ume@FreeBSD.org>2006-03-21 15:37:16 +0000
commit03859cff097cd048acc43548684969ea0b3e7f7e (patch)
tree6a044a277848f8d42cf8a314d701efea03241963 /lib/libc/inet/inet_lnaof.c
parent92fc9582cfae8294317ce04ae7e2d14f94dd3ca8 (diff)
downloadFreeBSD-src-03859cff097cd048acc43548684969ea0b3e7f7e.zip
FreeBSD-src-03859cff097cd048acc43548684969ea0b3e7f7e.tar.gz
- Merge our local changes.
- Exclude unnecessary functions for us.
Diffstat (limited to 'lib/libc/inet/inet_lnaof.c')
-rw-r--r--lib/libc/inet/inet_lnaof.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/libc/inet/inet_lnaof.c b/lib/libc/inet/inet_lnaof.c
index 97b80cf..678e02c 100644
--- a/lib/libc/inet/inet_lnaof.c
+++ b/lib/libc/inet/inet_lnaof.c
@@ -34,6 +34,8 @@
#if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include "port_before.h"
@@ -48,11 +50,11 @@ static const char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
* internet address; handles class a/b/c network
* number formats.
*/
-u_long
+in_addr_t
inet_lnaof(in)
struct in_addr in;
{
- register u_long i = ntohl(in.s_addr);
+ in_addr_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return ((i)&IN_CLASSA_HOST);
@@ -61,3 +63,10 @@ inet_lnaof(in)
else
return ((i)&IN_CLASSC_HOST);
}
+
+/*
+ * Weak aliases for applications that use certain private entry points,
+ * and fail to include <arpa/inet.h>.
+ */
+#undef inet_lnaof
+__weak_reference(__inet_lnaof, inet_lnaof);
OpenPOWER on IntegriCloud