From a4d23648f7093992aacafaec086bb9b90577b3d8 Mon Sep 17 00:00:00 2001 From: luk65 Date: Thu, 23 Mar 2017 23:56:25 +0800 Subject: [PATCH] solaris: handle big-endian https://github.com/warmcat/libwebsockets/issues/846 --- lib/private-libwebsockets.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index d902541d..3b4d7ff7 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -370,11 +370,23 @@ extern "C" { #endif #if defined(__sun) && defined(__GNUC__) + +#include + +#if !defined (BYTE_ORDER) # define BYTE_ORDER __BYTE_ORDER__ +#endif + +#if !defined(LITTLE_ENDIAN) # define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ +#endif + +#if !defined(BIG_ENDIAN) # define BIG_ENDIAN __ORDER_BIG_ENDIAN__ #endif +#endif /* sun + GNUC */ + #if !defined(BYTE_ORDER) # define BYTE_ORDER __BYTE_ORDER #endif -- 2.34.1