summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2016-10-24 09:20:00 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2016-10-24 09:20:21 +0100
commit8f2e4d09c5d8aedc0bc1950a0289621adae48291 (patch)
treef6c191ff403cf92de62d2be87861aceed3a4081d /sys-fs/btrfs-progs
parentwww-client/vivaldi: Stable for AMD64 x86 too. (diff)
downloadgentoo-8f2e4d09c5d8aedc0bc1950a0289621adae48291.tar.gz
gentoo-8f2e4d09c5d8aedc0bc1950a0289621adae48291.tar.bz2
gentoo-8f2e4d09c5d8aedc0bc1950a0289621adae48291.zip
sys-fs/btrfs-progs: fix missing depends of ioctl.h
Reported-by: Mikhail Pukhlikov <cynede@gentoo.org> Package-Manager: portage-2.3.2
Diffstat (limited to 'sys-fs/btrfs-progs')
-rw-r--r--sys-fs/btrfs-progs/btrfs-progs-4.8.1-r1.ebuild (renamed from sys-fs/btrfs-progs/btrfs-progs-4.8.1.ebuild)2
-rw-r--r--sys-fs/btrfs-progs/files/btrfs-progs-4.8.1-fix-ioctl.h36
2 files changed, 38 insertions, 0 deletions
diff --git a/sys-fs/btrfs-progs/btrfs-progs-4.8.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-4.8.1-r1.ebuild
index 7f648be159bf..b508b57e3f14 100644
--- a/sys-fs/btrfs-progs/btrfs-progs-4.8.1.ebuild
+++ b/sys-fs/btrfs-progs/btrfs-progs-4.8.1-r1.ebuild
@@ -58,6 +58,8 @@ if [[ ${PV} == 9999 ]]; then
DEPEND+=" sys-devel/gnuconfig"
fi
+PATCHES=("${FILESDIR}"/${P}-fix-ioctl.h)
+
src_prepare() {
default
if [[ ${PV} == 9999 ]]; then
diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-4.8.1-fix-ioctl.h b/sys-fs/btrfs-progs/files/btrfs-progs-4.8.1-fix-ioctl.h
new file mode 100644
index 000000000000..61b60c78faae
--- /dev/null
+++ b/sys-fs/btrfs-progs/files/btrfs-progs-4.8.1-fix-ioctl.h
@@ -0,0 +1,36 @@
+commit 3ddbf895db678fb40f7513bac9dbc36fd4095693
+Author: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Mon Oct 24 09:08:53 2016 +0100
+
+ ioctl.h: add missing kernel compatibility header for BUILD_ASSERT
+
+ Header breakage noticed by cynede. Reproducible as:
+
+ $ gcc -c /usr/include/btrfs/ioctl.h -o /tmp/a.o
+ /usr/include/btrfs/ioctl.h:42:14: error: expected declaration specifiers or '...' before 'sizeof'
+ BUILD_ASSERT(sizeof(struct btrfs_ioctl_vol_args) == 4096);
+ ^~~~~~
+
+ Basically gcc tries to say us BUILD_ASSERT is not visible.
+
+ BUILD_ASSERT lives in kerncompat.h which this change adds.
+
+ Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+
+diff --git a/ioctl.h b/ioctl.h
+index a7235c0..abea7ed 100644
+--- a/ioctl.h
++++ b/ioctl.h
+@@ -26,6 +26,12 @@ extern "C" {
+ #include <asm/types.h>
+ #include <linux/ioctl.h>
+
++#if BTRFS_FLAT_INCLUDES
++#include "kerncompat.h"
++#else
++#include <btrfs/kerncompat.h>
++#endif /* BTRFS_FLAT_INCLUDES */
++
+ #ifndef __user
+ #define __user
+ #endif