projects
/
oweals
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
407f7a0
)
blob.h: fix endian check
author
Felix Fietkau
<nbd@openwrt.org>
Sun, 2 Dec 2012 16:49:08 +0000
(17:49 +0100)
committer
Felix Fietkau
<nbd@openwrt.org>
Sun, 2 Dec 2012 16:49:12 +0000
(17:49 +0100)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob.h
patch
|
blob
|
history
diff --git
a/blob.h
b/blob.h
index 81a65ae6027441fd16d7bb8752744fa925d2c536..a8ddce99a1c64c1fd8ae7b40254620ae291c805d 100644
(file)
--- a/
blob.h
+++ b/
blob.h
@@
-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)