aboutsummaryrefslogtreecommitdiff
path: root/common/bytes.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/bytes.c')
-rw-r--r--common/bytes.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/common/bytes.c b/common/bytes.c
index af65568..a5b3c4a 100644
--- a/common/bytes.c
+++ b/common/bytes.c
@@ -3,11 +3,13 @@
#include <apos/bytes.h>
#include <apos/builtin.h>
+#undef __bswap16
__weak uint16_t __bswap16(uint16_t u)
{
return (u & 0xff00) >> 8 | (u & 0x00ff) << 8;
}
+#undef __bswap32
__weak uint32_t __bswap32(uint32_t u)
{
return (u & 0xff000000) >> 24 |
@@ -16,6 +18,7 @@ __weak uint32_t __bswap32(uint32_t u)
(u & 0x000000ff) << 24;
}
+#undef __bswap64
__weak uint64_t __bswap64(uint64_t u)
{
return (u & 0xff00000000000000ULL) >> 56 |