diff --git a/address.h b/address.h index d449ccf7..9564fcd1 100644 --- a/address.h +++ b/address.h @@ -26,6 +26,7 @@ #endif #include +#include #ifdef HAVE_NETINET_IN_H #include diff --git a/config.h.lwip b/config.h.lwip index 9fe6e7ab..baac7574 100644 --- a/config.h.lwip +++ b/config.h.lwip @@ -3,6 +3,7 @@ #include #include +#include /* provide ntohs, htons */ #define WITH_LWIP 1 @@ -13,9 +14,6 @@ * building in */ #define HAVE_STRNLEN 1 -/* provide what usually resides in arpa/inet.h: ntohs and htons. maybe it'd be a better way to just have an arpa/inet.h compatibility file in lwip? */ -#define HAVE_ENDIAN_H 1 - /* FIXME just a quick hack */ #define COAP_TICKS_PER_SECOND 10 diff --git a/debug.c b/debug.c index 18f5ed70..dcf771f3 100644 --- a/debug.c +++ b/debug.c @@ -20,9 +20,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_ENDIAN_H -#include "endian.h" -#endif #ifdef HAVE_TIME_H #include diff --git a/endian.h b/endian.h deleted file mode 100644 index abbc183d..00000000 --- a/endian.h +++ /dev/null @@ -1,13 +0,0 @@ -/* endianness helpers for lwip port */ - -/* FIXME: i'm sure there is something in lwip we can use */ - -#include - -/* we're on little endian, ntohs & co swap */ -static inline uint16_t ntohs(uint16_t x) -{ - return (x << 8) | (x >> 8); -} - -#define htons ntohs diff --git a/net.c b/net.c index 1f71b03c..061d8674 100644 --- a/net.c +++ b/net.c @@ -25,9 +25,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_ENDIAN_H -#include "endian.h" -#endif #ifdef WITH_LWIP #include diff --git a/pdu.c b/pdu.c index a2655c56..ce324731 100644 --- a/pdu.c +++ b/pdu.c @@ -18,9 +18,6 @@ #ifdef HAVE_ARPA_INET_H #include #endif -#ifdef HAVE_ENDIAN_H -#include "endian.h" -#endif #include "debug.h" #include "pdu.h"