diff options
author | Daniel Golle <daniel@makrotopia.org> | 2023-01-13 23:39:37 +0000 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2023-01-13 23:41:26 +0000 |
commit | 6ebbb6fecbda09436265df7525367cba943b0c07 (patch) | |
tree | 906a7acfd0497f33f20cd381c9854c532bfffdb1 /src/include/gnunet_common.h | |
parent | 0ea3761a54747bf335523af0c2440a37a881c71b (diff) | |
download | gnunet-6ebbb6fecbda09436265df7525367cba943b0c07.tar.gz gnunet-6ebbb6fecbda09436265df7525367cba943b0c07.zip |
fix compilation with big endian
The #if in gnunet_common.h is in the wrong spot. Move it to where it
should be.
Patch submitted by Rosen Penev <rosenp@gmail.com> to OpenWrt packages
repository.
Diffstat (limited to 'src/include/gnunet_common.h')
-rw-r--r-- | src/include/gnunet_common.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index ac472d166..9b2b50f01 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h | |||
@@ -164,7 +164,6 @@ enum GNUNET_GenericReturnValue | |||
164 | * Endian operations | 164 | * Endian operations |
165 | */ | 165 | */ |
166 | 166 | ||
167 | #if __BYTE_ORDER == __LITTLE_ENDIAN | ||
168 | #if defined(bswap_16) || defined(bswap_32) || defined(bswap_64) | 167 | #if defined(bswap_16) || defined(bswap_32) || defined(bswap_64) |
169 | #define BYTE_SWAP_16(x) bswap_16 (x) | 168 | #define BYTE_SWAP_16(x) bswap_16 (x) |
170 | #define BYTE_SWAP_32(x) bswap_32 (x) | 169 | #define BYTE_SWAP_32(x) bswap_32 (x) |
@@ -184,6 +183,7 @@ enum GNUNET_GenericReturnValue | |||
184 | 56)) | 183 | 56)) |
185 | #endif | 184 | #endif |
186 | 185 | ||
186 | #if __BYTE_ORDER == __LITTLE_ENDIAN | ||
187 | #define GNUNET_htobe16(x) BYTE_SWAP_16 (x) | 187 | #define GNUNET_htobe16(x) BYTE_SWAP_16 (x) |
188 | #define GNUNET_htole16(x) (x) | 188 | #define GNUNET_htole16(x) (x) |
189 | #define GNUNET_be16toh(x) BYTE_SWAP_16 (x) | 189 | #define GNUNET_be16toh(x) BYTE_SWAP_16 (x) |