From ac9099e4f02d931c0f0496a965c2fda21e493389 Mon Sep 17 00:00:00 2001
From: rmilecki <rmilecki@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Mon, 22 Jun 2015 07:51:00 +0000
Subject: [PATCH] otrx: add extra compilation check before using __BYTE_ORDER
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46106 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 package/utils/otrx/src/otrx.c | 4 ++++
 1 file changed, 4 insertions(+)

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)
-- 
GitLab