From a49d084429bb1ca293214ec54f2a5188b5a0098e Mon Sep 17 00:00:00 2001 From: emironov Date: Tue, 16 Sep 2014 14:05:13 +0400 Subject: [PATCH] fix byte order for qnx --- lib/private-libwebsockets.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index 380af858..f95eaba4 100755 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -205,6 +205,20 @@ typedef unsigned __int64 u_int64_t; #include #endif +#if defined(__QNX__) + #include + #if defined(__LITTLEENDIAN__) + #define BYTE_ORDER __LITTLEENDIAN__ + #define LITTLE_ENDIAN __LITTLEENDIAN__ + #define BIG_ENDIAN 4321 /* to show byte order (taken from gcc); for suppres warning that BIG_ENDIAN is not defined. */ + #endif + #if defined(__BIGENDIAN__) + #define BYTE_ORDER __BIGENDIAN__ + #define LITTLE_ENDIAN 1234 /* to show byte order (taken from gcc); for suppres warning that LITTLE_ENDIAN is not defined. */ + #define BIG_ENDIAN __BIGENDIAN__ + #endif +#endif + #if !defined(BYTE_ORDER) # define BYTE_ORDER __BYTE_ORDER #endif