From 9d8f2dd47b27d372c319ef7e334feb2b47cfa5f9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 2 Dec 2012 17:49:08 +0100 Subject: [PATCH] blob.h: fix endian check Signed-off-by: Felix Fietkau --- blob.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blob.h b/blob.h index 81a65ae..a8ddce9 100644 --- a/blob.h +++ b/blob.h @@ -26,8 +26,6 @@ #include #include -#if __BYTE_ORDER == __LITTLE_ENDIAN - #if defined(__linux__) || defined(__CYGWIN__) #include #include @@ -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)