Add patches for musl libc

This commit is contained in:
Mark Vainomaa 2018-11-10 22:36:42 +02:00
parent 67c3c8a30f
commit d2638141ff
Signed by: mikroskeem
GPG Key ID: 1B3F9523B542D315
2 changed files with 22 additions and 0 deletions

View File

@ -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 \

View File

@ -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