sys-fs/btrfs-progs: fix build failure on big-endian platforms

Reported-by: ernsteiswuerfel
Bug: https://bugs.gentoo.org/670741
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2018-11-10 21:44:53 +00:00
parent 67e2517b12
commit e2c6fa0a4d
2 changed files with 28 additions and 0 deletions

View File

@@ -72,6 +72,10 @@ fi
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
PATCHES=(
"${FILESDIR}"/${P}-be-bswap.patch
)
pkg_setup() {
use python && python-single-r1_pkg_setup
}

View File

@@ -0,0 +1,24 @@
Fix build failure on big-endian platforms.
Reported-by: ernsteiswuerfel
Bug: https://bugs.gentoo.org/670741
--- a/kernel-lib/bitops.h
+++ b/kernel-lib/bitops.h
@@ -180,5 +180,5 @@ static inline unsigned long ext2_swab(const unsigned long y)
#if BITS_PER_LONG == 64
- return (unsigned long) bswap64((u64) y);
+ return (unsigned long) bswap_64((u64) y);
#elif BITS_PER_LONG == 32
- return (unsigned long) bswap32((u32) y);
+ return (unsigned long) bswap_32((u32) y);
#else
@@ -220,3 +220,3 @@ static inline unsigned long _find_next_bit_le(const unsigned long *addr1,
-unsigned long find_next_zero_bit_le(const void *addr, unsigned long size,
+static inline unsigned long find_next_zero_bit_le(const void *addr, unsigned long size,
unsigned long offset)
@@ -227,3 +227,3 @@ unsigned long find_next_zero_bit_le(const void *addr, unsigned long size,
-unsigned long find_next_bit_le(const void *addr, unsigned long size,
+static inline unsigned long find_next_bit_le(const void *addr, unsigned long size,
unsigned long offset)