summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-04-18 18:22:14 -0400
committerMike Frysinger <vapier@gentoo.org>2016-04-18 18:22:21 -0400
commit6b2446cdc15c0c171f7e426687dc6b755bbf153d (patch)
treea98483336e92195c9db88451db93c86014e4a08d /sys-fs/f2fs-tools
parentsys-fs/f2fs-tools: drop old <1.6.0 versions (diff)
downloadgentoo-6b2446cdc15c0c171f7e426687dc6b755bbf153d.tar.gz
gentoo-6b2446cdc15c0c171f7e426687dc6b755bbf153d.tar.bz2
gentoo-6b2446cdc15c0c171f7e426687dc6b755bbf153d.zip
sys-fs/f2fs-tools: fix build w/newer glibc #580338
Diffstat (limited to 'sys-fs/f2fs-tools')
-rw-r--r--sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild6
-rw-r--r--sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch45
2 files changed, 50 insertions, 1 deletions
diff --git a/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild b/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild
index 793c43db22ce..a5edab40345b 100644
--- a/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild
+++ b/sys-fs/f2fs-tools/f2fs-tools-1.6.1.ebuild
@@ -4,7 +4,7 @@
EAPI=5
-inherit multilib
+inherit multilib eutils
DESCRIPTION="Tools for Flash-Friendly File System (F2FS)"
HOMEPAGE="https://git.kernel.org/?p=linux/kernel/git/jaegeuk/f2fs-tools.git;a=summary"
@@ -15,6 +15,10 @@ SLOT="0/0"
KEYWORDS="~amd64 ~arm ~mips ~ppc ~ppc64 ~x86"
IUSE=""
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-sysmacros.patch #580338
+}
+
src_configure() {
#This is required to install to /sbin, bug #481110
econf --prefix=/ --includedir=/usr/include
diff --git a/sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch b/sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch
new file mode 100644
index 000000000000..f5cc4a090188
--- /dev/null
+++ b/sys-fs/f2fs-tools/files/f2fs-tools-1.6.1-sysmacros.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/580338
+
+From d6abcb38899cd03d59e0f30c49419695f86ae543 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Mon, 18 Apr 2016 18:18:07 -0400
+Subject: [PATCH] fibmap: pull in sys/sysmacros.h for major/minor
+
+These funcs are provided by sys/sysmacros.h, so include the header
+directly. Building with alternative C libraries can fail otherwise
+like so:
+
+fibmap.c: In function 'print_stat':
+fibmap.c:36:32: warning: implicit declaration of function 'major' [-Wimplicit-function-declaration]
+ printf("dev [%d:%d]\n", major(st->st_dev), minor(st->st_dev));
+ ^
+fibmap.c:36:51: warning: implicit declaration of function 'minor' [-Wimplicit-function-declaration]
+ printf("dev [%d:%d]\n", major(st->st_dev), minor(st->st_dev));
+ ^
+fibmap.o: In function 'print_stat':
+tools/fibmap.c:36: undefined reference to 'minor'
+tools/fibmap.c:36: undefined reference to 'major'
+fibmap.o: In function 'stat_bdev':
+tools/fibmap.c:59: undefined reference to 'minor'
+tools/fibmap.c:59: undefined reference to 'major'
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tools/fibmap.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tools/fibmap.c b/tools/fibmap.c
+index 224b233..6b092f5 100644
+--- a/tools/fibmap.c
++++ b/tools/fibmap.c
+@@ -8,6 +8,7 @@
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <libgen.h>
+ #include <linux/hdreg.h>
+ #include <linux/types.h>
+--
+2.7.4
+