From: Hauke Mehrtens Date: Mon, 8 Jun 2015 19:57:52 +0000 (+0200) Subject: libcoap: fix big endian problems X-Git-Tag: 1.2.0+RC1~1596 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=62c0a14ccd333d0e55fc431f151253a72a2836d0;p=platform%2Fupstream%2Fiotivity.git libcoap: fix big endian problems When this is build for a big endian Linux system WORDS_BIGENDIAN was not be set. This patch sets it correctly so it will not generate broken code on big endian systems. This was tested on MIPS BE 32 Bit. Change-Id: I59dd07d8020c553318e2aa43894a2185fe9b9286 Signed-off-by: Hauke Mehrtens Reviewed-on: https://gerrit.iotivity.org/gerrit/1219 Tested-by: jenkins-iotivity Reviewed-by: Erich Keane --- diff --git a/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h b/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h index 6d2beb6..71d396a 100644 --- a/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h +++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/config.h @@ -135,8 +135,8 @@ # define WORDS_BIGENDIAN 1 # endif #else -# ifndef WORDS_BIGENDIAN -/* # undef WORDS_BIGENDIAN */ +# if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +# define WORDS_BIGENDIAN 1 # endif #endif