summaryrefslogtreecommitdiffstats
path: root/lib/libc/inet/inet_lnaof.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/inet/inet_lnaof.c')
-rw-r--r--lib/libc/inet/inet_lnaof.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/libc/inet/inet_lnaof.c b/lib/libc/inet/inet_lnaof.c
index 70ac409..9e419f7 100644
--- a/lib/libc/inet/inet_lnaof.c
+++ b/lib/libc/inet/inet_lnaof.c
@@ -10,10 +10,6 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
@@ -34,6 +30,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"
@@ -43,16 +41,16 @@ static const char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
#include "port_after.h"
-/*%
+/*
* Return the local network address portion of an
* 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);
@@ -62,4 +60,9 @@ inet_lnaof(in)
return ((i)&IN_CLASSC_HOST);
}
-/*! \file */
+/*
+ * 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