[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Improve bswap portability
From: |
Malte Voos |
Subject: |
[PATCH] Improve bswap portability |
Date: |
Sun, 19 Sep 2021 10:34:30 +0200 |
The official function names are bswap_*, not __bswap_*. The latter won't
compile with Android's bionic libc.
---
src/include/gnunet_common.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index ca3ddceaa..b09fef93f 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -152,9 +152,9 @@ enum GNUNET_GenericReturnValue
#if __BYTE_ORDER == __LITTLE_ENDIAN
#if defined(__linux__)
-#define BYTE_SWAP_16(x) __bswap_16 (x)
-#define BYTE_SWAP_32(x) __bswap_32 (x)
-#define BYTE_SWAP_64(x) __bswap_64 (x)
+#define BYTE_SWAP_16(x) bswap_16 (x)
+#define BYTE_SWAP_32(x) bswap_32 (x)
+#define BYTE_SWAP_64(x) bswap_64 (x)
#else
#define BYTE_SWAP_16(x) ((((x) & 0x00ff) << 8) | (((x) & 0xff00) >> 8))
--
2.32.0
- [PATCH] Improve bswap portability,
Malte Voos <=