aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/otrx/src/otrx.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2015-06-22 07:51:00 +0000
committerRafał Miłecki <zajec5@gmail.com>2015-06-22 07:51:00 +0000
commite0a3d9d1152a05c7c8ba6cd713e394c862ce9252 (patch)
tree96067e35da15acdce20175dbe53a4537e7f76d01 /package/utils/otrx/src/otrx.c
parent0e5c445df65f80dd844ccc321479443152ba88c9 (diff)
downloadupstream-e0a3d9d1152a05c7c8ba6cd713e394c862ce9252.tar.gz
upstream-e0a3d9d1152a05c7c8ba6cd713e394c862ce9252.tar.bz2
upstream-e0a3d9d1152a05c7c8ba6cd713e394c862ce9252.zip
otrx: add extra compilation check before using __BYTE_ORDER
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 46106
Diffstat (limited to 'package/utils/otrx/src/otrx.c')
-rw-r--r--package/utils/otrx/src/otrx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c
index 131d8d6052..101a31004d 100644
--- a/package/utils/otrx/src/otrx.c
+++ b/package/utils/otrx/src/otrx.c
@@ -18,6 +18,10 @@
#include <string.h>
#include <unistd.h>
+#if !defined(__BYTE_ORDER)
+#error "Unknown byte order"
+#endif
+
#if __BYTE_ORDER == __BIG_ENDIAN
#define cpu_to_le32(x) bswap_32(x)
#define le32_to_cpu(x) bswap_32(x)