From d2638141ff1a0bc00e9206674c59cc93824c9ecf Mon Sep 17 00:00:00 2001 From: Mark Vainomaa Date: Sat, 10 Nov 2018 22:36:42 +0200 Subject: [PATCH] Add patches for musl libc --- pkgs/musl-libc/build.sh | 5 +++++ .../patches/fix-endian-header-warnings.patch | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/musl-libc/patches/fix-endian-header-warnings.patch diff --git a/pkgs/musl-libc/build.sh b/pkgs/musl-libc/build.sh index f528c04..e4464b5 100755 --- a/pkgs/musl-libc/build.sh +++ b/pkgs/musl-libc/build.sh @@ -12,6 +12,11 @@ prepare () { build () { cd "${srcdir}/musl-${pkgver}" + + for p in "${wd}"/patches/*.patch; do + patch -u -p0 < "${p}" + done + mkdir build && cd build ../configure \ diff --git a/pkgs/musl-libc/patches/fix-endian-header-warnings.patch b/pkgs/musl-libc/patches/fix-endian-header-warnings.patch new file mode 100644 index 0000000..15a06f9 --- /dev/null +++ b/pkgs/musl-libc/patches/fix-endian-header-warnings.patch @@ -0,0 +1,17 @@ +--- 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