2021-10-20 08:26:00 +02:00
|
|
|
--- a/src/include/gnunet_common.h
|
|
|
|
+++ b/src/include/gnunet_common.h
|
2022-10-07 00:33:58 +02:00
|
|
|
@@ -164,7 +164,6 @@ enum GNUNET_GenericReturnValue
|
2021-10-20 08:26:00 +02:00
|
|
|
* Endian operations
|
|
|
|
*/
|
|
|
|
|
|
|
|
-#if __BYTE_ORDER == __LITTLE_ENDIAN
|
2022-10-07 00:33:58 +02:00
|
|
|
#if defined(bswap_16) || defined(bswap_32) || defined(bswap_64)
|
2022-03-13 02:29:49 +01:00
|
|
|
#define BYTE_SWAP_16(x) bswap_16 (x)
|
|
|
|
#define BYTE_SWAP_32(x) bswap_32 (x)
|
2022-10-07 00:33:58 +02:00
|
|
|
@@ -184,6 +183,7 @@ enum GNUNET_GenericReturnValue
|
2021-10-20 08:26:00 +02:00
|
|
|
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)
|