diff options
author | Sam James <sam@gentoo.org> | 2021-12-30 09:40:51 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2021-12-30 09:40:51 +0000 |
commit | f3b533bb1984665fe0864dfba62eb1d933caf3c4 (patch) | |
tree | 38a5972aadc1a4d2c879333346eddaabdd33cef0 /sys-fs | |
parent | sys-kernel/linux-headers: fix 5.10 for musl (sysinfo.h) (diff) | |
download | gentoo-f3b533bb1984665fe0864dfba62eb1d933caf3c4.tar.gz gentoo-f3b533bb1984665fe0864dfba62eb1d933caf3c4.tar.bz2 gentoo-f3b533bb1984665fe0864dfba62eb1d933caf3c4.zip |
sys-fs/btrfs-progs: fix build on musl
Closes: https://bugs.gentoo.org/830277
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild | 8 | ||||
-rw-r--r-- | sys-fs/btrfs-progs/files/5.15-musl-const.h-include.patch | 34 |
2 files changed, 40 insertions, 2 deletions
diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild index 1669da04cd9e..01b66383b662 100644 --- a/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild +++ b/sys-fs/btrfs-progs/btrfs-progs-5.15.1.ebuild @@ -29,7 +29,7 @@ LICENSE="GPL-2" SLOT="0/${libbtrfs_soname}" IUSE="+convert doc python reiserfs static static-libs +zstd" -RESTRICT=test # tries to mount repared filesystems +RESTRICT="test" # tries to mount repaired filesystems RDEPEND=" dev-libs/lzo:2= @@ -74,11 +74,15 @@ BDEPEND=" " if [[ ${PV} == 9999 ]]; then - DEPEND+=" sys-devel/gnuconfig" + BDEPEND+=" sys-devel/gnuconfig" fi REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" +PATCHES=( + "${FILESDIR}"/5.15-musl-const.h-include.patch +) + pkg_setup() { use python && python-single-r1_pkg_setup } diff --git a/sys-fs/btrfs-progs/files/5.15-musl-const.h-include.patch b/sys-fs/btrfs-progs/files/5.15-musl-const.h-include.patch new file mode 100644 index 000000000000..a9156ade4b79 --- /dev/null +++ b/sys-fs/btrfs-progs/files/5.15-musl-const.h-include.patch @@ -0,0 +1,34 @@ +https://cgit.openembedded.org/openembedded-core/plain/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch?id=fd8989db25c674ca65389a2d41bf5b447e8794be + +From: Bruce Ashfield <bruce.ashfield@gmail.com> +Date: Fri, 18 Jun 2021 11:10:36 -0400 +Subject: [PATCH] btrfs-progs: include linux/const.h to fix build with 5.12+ + headers + +btrfs-tools compile fails with mips, musl and 5.12+ headers. + +The definition of __ALIGN_KERNEL has moved in 5.12+ kernels, so we +add an explicit include of const.h to pickup the macro: + + | make: *** [Makefile:595: mkfs.btrfs] Error 1 + | make: *** Waiting for unfinished jobs.... + | libbtrfs.a(volumes.o): in function `dev_extent_search_start': + | /usr/src/debug/btrfs-tools/5.12.1-r0/git/kernel-shared/volumes.c:464: undefined reference to `__ALIGN_KERNEL' + | collect2: error: ld returned 1 exit status + +This is safe for older kernel's as well, since the header still +exists, and is valid to include. + +Upstream-status: OE Specific [mips64 + musl + libc-headers] + +Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> +--- a/kerncompat.h ++++ b/kerncompat.h +@@ -30,6 +30,7 @@ + #include <linux/types.h> + #include <linux/kernel.h> + #include <stdint.h> ++#include <linux/const.h> + + #include <features.h> + |