diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-12-02 20:49:08 +0400 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-12-02 20:49:12 +0400 |
commit | 9d8f2dd47b27d372c319ef7e334feb2b47cfa5f9 (patch) | |
tree | 6be0b5fb5c0819451c9dabfa929d312fa1189872 /blob.h | |
parent | 407f7a0bb3272ee03f2eb05391ce8b94238fa92e (diff) |
blob.h: fix endian check
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'blob.h')
-rw-r--r-- | blob.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -26,8 +26,6 @@ #include <stdio.h> #include <errno.h> -#if __BYTE_ORDER == __LITTLE_ENDIAN - #if defined(__linux__) || defined(__CYGWIN__) #include <byteswap.h> #include <endian.h> @@ -60,6 +58,8 @@ #define __LITTLE_ENDIAN LITTLE_ENDIAN #endif +#if __BYTE_ORDER == __LITTLE_ENDIAN + #define cpu_to_be64(x) bswap_64(x) #define cpu_to_be32(x) bswap_32(x) #define cpu_to_be16(x) bswap_16(x) |