forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -112,27 +112,6 @@ struct in_addr {
|
|||||||
#define _STRUCT_IN_ADDR_DECLARED
|
#define _STRUCT_IN_ADDR_DECLARED
|
||||||
#endif
|
#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
|
__BEGIN_DECLS
|
||||||
#ifndef _BYTEORDER_PROTOTYPED
|
#ifndef _BYTEORDER_PROTOTYPED
|
||||||
#define _BYTEORDER_PROTOTYPED
|
#define _BYTEORDER_PROTOTYPED
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ inet_aton(const char *cp, struct in_addr *addr) {
|
|||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
/*
|
/*
|
||||||
* Weak aliases for applications that use certain private entry points,
|
* Weak aliases for applications that use certain private entry points,
|
||||||
* and fail to include <arpa/inet.h>.
|
* 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);
|
__weak_reference(__inet_addr, inet_addr);
|
||||||
#undef inet_aton
|
#undef inet_aton
|
||||||
__weak_reference(__inet_aton, inet_aton);
|
__weak_reference(__inet_aton, inet_aton);
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ inet_ntoa_r(struct in_addr in, char *buf, socklen_t size)
|
|||||||
return (buf);
|
return (buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
/*
|
/*
|
||||||
* Weak aliases for applications that use certain private entry points,
|
* Weak aliases for applications that use certain private entry points,
|
||||||
* and fail to include <arpa/inet.h>.
|
* 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
|
#undef inet_ntoa
|
||||||
__weak_reference(__inet_ntoa, inet_ntoa);
|
__weak_reference(__inet_ntoa, inet_ntoa);
|
||||||
__weak_reference(__inet_ntoa_r, inet_ntoa_r);
|
__weak_reference(__inet_ntoa_r, inet_ntoa_r);
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|||||||
@@ -194,11 +194,13 @@ inet_ntop6(const u_char *src, char *dst, socklen_t size)
|
|||||||
return (dst);
|
return (dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
/*
|
/*
|
||||||
* Weak aliases for applications that use certain private entry points,
|
* Weak aliases for applications that use certain private entry points,
|
||||||
* and fail to include <arpa/inet.h>.
|
* and fail to include <arpa/inet.h>.
|
||||||
*/
|
*/
|
||||||
#undef inet_ntop
|
#undef inet_ntop
|
||||||
__weak_reference(__inet_ntop, inet_ntop);
|
__weak_reference(__inet_ntop, inet_ntop);
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
|
#ifndef __rtems__
|
||||||
__weak_reference(__inet_addr, inet_addr);
|
__weak_reference(__inet_addr, inet_addr);
|
||||||
__weak_reference(__inet_aton, inet_aton);
|
__weak_reference(__inet_aton, inet_aton);
|
||||||
__weak_reference(__inet_lnaof, inet_lnaof);
|
__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_ntop, inet_ntop);
|
||||||
__weak_reference(__inet_nsap_addr, inet_nsap_addr);
|
__weak_reference(__inet_nsap_addr, inet_nsap_addr);
|
||||||
__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa);
|
__weak_reference(__inet_nsap_ntoa, inet_nsap_ntoa);
|
||||||
|
#endif /* __rtems__ */
|
||||||
|
|
||||||
__weak_reference(__sym_ston, sym_ston);
|
__weak_reference(__sym_ston, sym_ston);
|
||||||
__weak_reference(__sym_ntos, sym_ntos);
|
__weak_reference(__sym_ntos, sym_ntos);
|
||||||
|
|||||||
Reference in New Issue
Block a user