summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-12 13:56:40 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-06-12 14:03:54 +0200
commit86c100439c5f33f5def3edf2ee05ea591b1774a4 (patch)
treeb0ea1050db2c5048c43b2aba70937fb0e40c3437
parenti386: Support thread-local storage (TLS) (diff)
downloadrtems-86c100439c5f33f5def3edf2ee05ea591b1774a4.tar.bz2
network: Remove FreeBSD specific hack
For whatever reason FreeBSD renames several functions provided by <arpa/inet.h> and uses weak references to provide the standard function names. This causes problems on targets lacking proper support for weak references. We do not need this function renaming on RTEMS.lk:x Update #2833.
-rw-r--r--cpukit/libnetworking/include/arpa/inet.h21
-rw-r--r--cpukit/libnetworking/libc/inet_addr.c2
-rw-r--r--cpukit/libnetworking/libc/inet_ntoa.c2
-rw-r--r--cpukit/libnetworking/libc/inet_ntop.c2
-rw-r--r--cpukit/libnetworking/libc/res_stubs.c2
5 files changed, 8 insertions, 21 deletions
diff --git a/cpukit/libnetworking/include/arpa/inet.h b/cpukit/libnetworking/include/arpa/inet.h
index d71c92748e..91e3a828ab 100644
--- a/cpukit/libnetworking/include/arpa/inet.h
+++ b/cpukit/libnetworking/include/arpa/inet.h
@@ -112,27 +112,6 @@ struct in_addr {
#define _STRUCT_IN_ADDR_DECLARED
#endif
-/* XXX all new diversions!! argh!! */
-#if __BSD_VISIBLE
-#define inet_addr __inet_addr
-#define inet_aton __inet_aton
-#define inet_lnaof __inet_lnaof
-#define inet_makeaddr __inet_makeaddr
-#define inet_neta __inet_neta
-#define inet_netof __inet_netof
-#define inet_network __inet_network
-#define inet_net_ntop __inet_net_ntop
-#define inet_net_pton __inet_net_pton
-#define inet_cidr_ntop __inet_cidr_ntop
-#define inet_cidr_pton __inet_cidr_pton
-#define inet_ntoa __inet_ntoa
-#define inet_ntoa_r __inet_ntoa_r
-#define inet_pton __inet_pton
-#define inet_ntop __inet_ntop
-#define inet_nsap_addr __inet_nsap_addr
-#define inet_nsap_ntoa __inet_nsap_ntoa
-#endif /* __BSD_VISIBLE */
-
__BEGIN_DECLS
#ifndef _BYTEORDER_PROTOTYPED
#define _BYTEORDER_PROTOTYPED
diff --git a/cpukit/libnetworking/libc/inet_addr.c b/cpukit/libnetworking/libc/inet_addr.c
index 2e1dc35324..af72d507a4 100644
--- a/cpukit/libnetworking/libc/inet_addr.c
+++ b/cpukit/libnetworking/libc/inet_addr.c
@@ -202,6 +202,7 @@ inet_aton(const char *cp, struct in_addr *addr) {
return (1);
}
+#ifndef __rtems__
/*
* Weak aliases for applications that use certain private entry points,
* and fail to include <arpa/inet.h>.
@@ -210,5 +211,6 @@ inet_aton(const char *cp, struct in_addr *addr) {
__weak_reference(__inet_addr, inet_addr);
#undef inet_aton
__weak_reference(__inet_aton, inet_aton);
+#endif /* __rtems__ */
/*! \file */
diff --git a/cpukit/libnetworking/libc/inet_ntoa.c b/cpukit/libnetworking/libc/inet_ntoa.c
index 0fecfe36da..80f662d929 100644
--- a/cpukit/libnetworking/libc/inet_ntoa.c
+++ b/cpukit/libnetworking/libc/inet_ntoa.c
@@ -67,6 +67,7 @@ inet_ntoa_r(struct in_addr in, char *buf, socklen_t size)
return (buf);
}
+#ifndef __rtems__
/*
* Weak aliases for applications that use certain private entry points,
* and fail to include <arpa/inet.h>.
@@ -74,5 +75,6 @@ inet_ntoa_r(struct in_addr in, char *buf, socklen_t size)
#undef inet_ntoa
__weak_reference(__inet_ntoa, inet_ntoa);
__weak_reference(__inet_ntoa_r, inet_ntoa_r);
+#endif /* __rtems__ */
/*! \file */
diff --git a/cpukit/libnetworking/libc/inet_ntop.c b/cpukit/libnetworking/libc/inet_ntop.c
index b54eec714e..4ea2ee348c 100644
--- a/cpukit/libnetworking/libc/inet_ntop.c
+++ b/cpukit/libnetworking/libc/inet_ntop.c
@@ -194,11 +194,13 @@ inet_ntop6(const u_char *src, char *dst, socklen_t size)
return (dst);
}
+#ifndef __rtems__
/*
* Weak aliases for applications that use certain private entry points,
* and fail to include <arpa/inet.h>.
*/
#undef inet_ntop
__weak_reference(__inet_ntop, inet_ntop);
+#endif /* __rtems__ */
/*! \file */
diff --git a/cpukit/libnetworking/libc/res_stubs.c b/cpukit/libnetworking/libc/res_stubs.c
index eb32ccb901..3e8b4ee45b 100644
--- a/cpukit/libnetworking/libc/res_stubs.c
+++ b/cpukit/libnetworking/libc/res_stubs.c
@@ -43,6 +43,7 @@
#include <sys/types.h>
#include <sys/cdefs.h>
+#ifndef __rtems__
__weak_reference(__inet_addr, inet_addr);
__weak_reference(__inet_aton, inet_aton);
__weak_reference(__inet_lnaof, inet_lnaof);
@@ -57,6 +58,7 @@ __weak_reference(__inet_pton, inet_pton);
__weak_reference(__inet_ntop, inet_ntop);
__weak_reference(__inet_nsap_addr, inet_nsap_addr);
__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa);
+#endif /* __rtems__ */
__weak_reference(__sym_ston, sym_ston);
__weak_reference(__sym_ntos, sym_ntos);