Fixed bug #29763 (CHECKSUM_GEN_IP_INLINE), added macro LWIP_MAKE_U16() that's improved for endianess

This commit is contained in:
goldsimon
2010-05-04 18:59:52 +00:00
parent 4b7288e8f4
commit abc36471d9
2 changed files with 7 additions and 1 deletions

View File

@@ -47,6 +47,12 @@ extern "C" {
#define NULL ((void *)0)
#endif
#if BYTE_ORDER == LITTLE_ENDIAN
#define LWIP_MAKE_U16(a, b) ((a << 8) | b)
#else
#define LWIP_MAKE_U16(a, b) ((b << 8) | a)
#endif
#ifdef htons
#undef htons
#endif /* htons */