blob.h: fix endian check

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
This commit is contained in:
Felix Fietkau 2012-12-02 17:49:08 +01:00
parent 407f7a0bb3
commit 9d8f2dd47b

4
blob.h
View file

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