musl_root/pkgs/musl-libc/patches/fix-endian-header-warnings....

18 lines
535 B
Diff

--- include/endian.h 2018-11-10 21:41:13.459743342 +0200
+++ include/endian.h 2018-11-10 21:42:31.670836301 +0200
@@ -29,12 +29,12 @@
static __inline uint32_t __bswap32(uint32_t __x)
{
- return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24;
+ return __x>>24 | ((__x>>8)&0xff00) | ((__x<<8)&0xff0000) | __x<<24;
}
static __inline uint64_t __bswap64(uint64_t __x)
{
- return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32);
+ return (__bswap32(__x)+(0ULL<<32)) | __bswap32(__x>>32);
}
#if __BYTE_ORDER == __LITTLE_ENDIAN