Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/sys/linux/net/inet_lnaof.c')
-rw-r--r--newlib/libc/sys/linux/net/inet_lnaof.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/newlib/libc/sys/linux/net/inet_lnaof.c b/newlib/libc/sys/linux/net/inet_lnaof.c
index 0e115a442..c6c999dd1 100644
--- a/newlib/libc/sys/linux/net/inet_lnaof.c
+++ b/newlib/libc/sys/linux/net/inet_lnaof.c
@@ -10,6 +10,10 @@
* 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.
@@ -30,6 +34,9 @@
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)inet_lnaof.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <machine/endian.h>
#include <sys/param.h>
#include <netinet/in.h>
@@ -44,7 +51,7 @@ in_addr_t
inet_lnaof(in)
struct in_addr in;
{
- register u_int32_t i = ntohl(in.s_addr);
+ in_addr_t i = ntohl(in.s_addr);
if (IN_CLASSA(i))
return ((i)&IN_CLASSA_HOST);
@@ -53,3 +60,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);