projects
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix ipset compile with 2.6.22-rc4
[openwrt.git]
/
tools
/
include
/
endian.h
diff --git
a/tools/include/endian.h
b/tools/include/endian.h
index
4ea34cd
..
25d100d
100644
(file)
--- a/
tools/include/endian.h
+++ b/
tools/include/endian.h
@@
-2,6
+2,7
@@
#define __endian_compat_h
#if defined(__linux__)
#define __endian_compat_h
#if defined(__linux__)
+#include <byteswap.h>
#include_next <endian.h>
#elif defined(__APPLE__)
#include <machine/endian.h>
#include_next <endian.h>
#elif defined(__APPLE__)
#include <machine/endian.h>
@@
-9,6
+10,11
@@
#define bswap_16(x) NXSwapShort(x)
#define bswap_32(x) NXSwapInt(x)
#define bswap_64(x) NXSwapLongLong(x)
#define bswap_16(x) NXSwapShort(x)
#define bswap_32(x) NXSwapInt(x)
#define bswap_64(x) NXSwapLongLong(x)
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+#define bswap_16(x) bswap16(x)
+#define bswap_32(x) bswap32(x)
+#define bswap_64(x) bswap64(x)
#else
#include <machine/endian.h>
#define bswap_16(x) swap16(x)
#else
#include <machine/endian.h>
#define bswap_16(x) swap16(x)
This page took
0.027254 seconds
and
4
git commands to generate.