summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-11-27 18:50:07 -0500
committerMike Frysinger <vapier@gentoo.org>2016-11-27 18:50:07 -0500
commitd19be01596dc1d8590b47a5da70f636da7cbdcea (patch)
tree294a7e7dec34eb7a58fc2eb47a3d0d13591b7847 /sys-block
parentmedia-libs/xine-lib: fix build w/newer glibc #580012 (diff)
downloadgentoo-d19be01596dc1d8590b47a5da70f636da7cbdcea.tar.gz
gentoo-d19be01596dc1d8590b47a5da70f636da7cbdcea.tar.bz2
gentoo-d19be01596dc1d8590b47a5da70f636da7cbdcea.zip
sys-block/tgt: fix build w/newer glibc #580594
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/tgt/files/tgt-1.0.69-sysmacros.patch38
-rw-r--r--sys-block/tgt/tgt-1.0.69.ebuild2
2 files changed, 40 insertions, 0 deletions
diff --git a/sys-block/tgt/files/tgt-1.0.69-sysmacros.patch b/sys-block/tgt/files/tgt-1.0.69-sysmacros.patch
new file mode 100644
index 000000000000..0b28f02e2821
--- /dev/null
+++ b/sys-block/tgt/files/tgt-1.0.69-sysmacros.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/580594
+https://github.com/fujita/tgt/pull/25
+
+From b092c6fe330a2eacf4b1d4eb093fad8e2fbcaed9 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 27 Nov 2016 18:47:24 -0500
+Subject: [PATCH] fix build w/newer glibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Building with newer glibc versions fails like so:
+bs_sg.c: In function ‘chk_sg_device’:
+bs_sg.c:354:6: error: implicit declaration of function ‘major’ [-Werror=implicit-function-declaration]
+ if (major(st.st_rdev) == SCSI_GENERIC_MAJOR)
+
+This is because glibc is dropping the implicit sys/sysmacros.h include
+from sys/types.h and making the few projects that need it include it
+explicitly.
+---
+ usr/bs_sg.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/usr/bs_sg.c b/usr/bs_sg.c
+index 66f4a3b22a18..fb544056f258 100644
+--- a/usr/bs_sg.c
++++ b/usr/bs_sg.c
+@@ -32,6 +32,7 @@
+ #include <linux/fs.h>
+ #include <linux/major.h>
+ #include <sys/ioctl.h>
++#include <sys/sysmacros.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/epoll.h>
+--
+2.11.0.rc2
+
diff --git a/sys-block/tgt/tgt-1.0.69.ebuild b/sys-block/tgt/tgt-1.0.69.ebuild
index 916d0f7c3892..8a0ff08229f4 100644
--- a/sys-block/tgt/tgt-1.0.69.ebuild
+++ b/sys-block/tgt/tgt-1.0.69.ebuild
@@ -37,6 +37,8 @@ pkg_setup() {
}
src_prepare() {
+ epatch "${FILESDIR}"/${P}-sysmacros.patch #580594
+
sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
# make sure xml docs are generated before trying to install them