From c6d44dd96350fc688b751c83e23e38045741fe86 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sat, 17 Dec 2016 14:02:42 +0000 Subject: [PATCH] Fix endian.h on Windows (remove the sys/param.h include). --- src/include/compat/endian.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/include/compat/endian.h b/src/include/compat/endian.h index 674f2e03..924cf1f1 100644 --- a/src/include/compat/endian.h +++ b/src/include/compat/endian.h @@ -61,10 +61,9 @@ # define be64toh(x) betoh64(x) # define le64toh(x) letoh64(x) #elif defined(__WINDOWS__) -# include -# include - # if BYTE_ORDER == LITTLE_ENDIAN +# include + # define htobe16(x) htons(x) # define htole16(x) (x) # define be16toh(x) ntohs(x) @@ -79,8 +78,7 @@ # define htole64(x) (x) # define be64toh(x) ntohll(x) # define le64toh(x) (x) -# elif BYTE_ORDER == BIG_ENDIAN - /* that would be xbox 360 */ +# elif BYTE_ORDER == BIG_ENDIAN /* that would be xbox 360 */ # define htobe16(x) (x) # define htole16(x) __builtin_bswap16(x) # define be16toh(x) (x)