mirror of
https://github.com/openwrt/packages.git
synced 2026-01-10 11:44:48 +00:00
gnunet: fix compilation with big endian
if is in the wrong spot. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
18
net/gnunet/patches/010-endian.patch
Normal file
18
net/gnunet/patches/010-endian.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- a/src/include/gnunet_common.h
|
||||
+++ b/src/include/gnunet_common.h
|
||||
@@ -142,7 +142,6 @@ enum GNUNET_GenericReturnValue
|
||||
* Endian operations
|
||||
*/
|
||||
|
||||
-#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#if defined(__linux__)
|
||||
#define BYTE_SWAP_16(x) __bswap_16 (x)
|
||||
#define BYTE_SWAP_32(x) __bswap_32 (x)
|
||||
@@ -162,6 +161,7 @@ enum GNUNET_GenericReturnValue
|
||||
56))
|
||||
#endif
|
||||
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define GNUNET_htobe16(x) BYTE_SWAP_16 (x)
|
||||
#define GNUNET_htole16(x) (x)
|
||||
#define GNUNET_be16toh(x) BYTE_SWAP_16 (x)
|
||||
Reference in New Issue
Block a user