diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-04-09 23:04:47 -0700 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2011-04-12 14:40:54 -0700 |
commit | a89bdfdcc7e432e18787472e5cacc745a93b928f (patch) | |
tree | f16b2ab74d42c559553cb9a18ec56e11662df9a1 /core | |
parent | a8e782f8cefdf0311902ded3e67ab48cec892163 (diff) | |
download | syslinux-a89bdfdcc7e432e18787472e5cacc745a93b928f.tar.gz syslinux-a89bdfdcc7e432e18787472e5cacc745a93b928f.tar.xz syslinux-a89bdfdcc7e432e18787472e5cacc745a93b928f.zip |
lwip: Use byteswap.h to define htons and friends
Define lwip's byteswapping in terms of byteswap.h
This ensures htons(CONSTANT) is seen as a constant
by gcc, and it allows us to use unmodified lwip headers.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/lwip/src/include/lwipopts.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/lwip/src/include/lwipopts.h b/core/lwip/src/include/lwipopts.h index dea91c45..34ddd70a 100644 --- a/core/lwip/src/include/lwipopts.h +++ b/core/lwip/src/include/lwipopts.h @@ -1,6 +1,8 @@ #ifndef __LWIPOPTS_H__ #define __LWIPOPTS_H__ +#include <byteswap.h> + #define SYS_LIGHTWEIGHT_PROT 1 #define LWIP_NETIF_API 1 #define LWIP_DNS 1 @@ -55,4 +57,8 @@ #define LWIP_STATS 1 #define LWIP_STATS_DISPLAY 1 +#define LWIP_PLATFORM_BYTESWAP 1 +#define LWIP_PLATFORM_HTONS(x) bswap_16(x) +#define LWIP_PLATFORM_HTONL(x) bswap_32(x) + #endif /* __LWIPOPTS_H__ */ |