|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/NEWLIB PATCH] include/endian.h Define the __bswap16, __bswap32, __bswap64 builtin functions only if the compilation is done with gcc
Signed-off-by: Alice Suiu <alicesuiu17@xxxxxxxxx>
---
include/endian.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/endian.h b/include/endian.h
index 3c8a752..63d3650 100644
--- a/include/endian.h
+++ b/include/endian.h
@@ -41,6 +41,7 @@
#include <stdint.h>
+#ifndef __clang__
static inline uint16_t __bswap16(uint16_t __x)
{
return __x<<8 | __x>>8;
@@ -55,6 +56,7 @@ static inline uint64_t __bswap64(uint64_t __x)
{
return (__bswap32(__x)+0ULL)<<32 | __bswap32(__x>>32);
}
+#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htobe16(x) __bswap16(x)
--
2.17.1
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |