diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2015-06-22 07:51:00 +0000 |
---|---|---|
committer | Rafał Miłecki <zajec5@gmail.com> | 2015-06-22 07:51:00 +0000 |
commit | e1722c400783c9c622ae6eb31e50dbbaab1b0b44 (patch) | |
tree | 9108451dcb5db1c15bbc96f987bb3253781af4b6 /package | |
parent | acf3115d033b9ac4ca0bedd27f3227bc5023b5b4 (diff) | |
download | master-187ad058-e1722c400783c9c622ae6eb31e50dbbaab1b0b44.tar.gz master-187ad058-e1722c400783c9c622ae6eb31e50dbbaab1b0b44.tar.bz2 master-187ad058-e1722c400783c9c622ae6eb31e50dbbaab1b0b44.zip |
otrx: add extra compilation check before using __BYTE_ORDER
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46106 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/utils/otrx/src/otrx.c | 4 |
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) |