summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-03 20:09:59 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-03 20:09:59 +0000
commitfb7025e14d126a007fbc20f24e3723710d5f73f5 (patch)
treedcfd4e9ca6d0dcdcca3b6630f7e977e18745ca56 /sys-apps/util-linux
parentold (diff)
downloadgentoo-2-fb7025e14d126a007fbc20f24e3723710d5f73f5.tar.gz
gentoo-2-fb7025e14d126a007fbc20f24e3723710d5f73f5.tar.bz2
gentoo-2-fb7025e14d126a007fbc20f24e3723710d5f73f5.zip
Fix building with older linux/falloc.h #339432 by Andrew Randrianasulu.
(Portage version: 2.2_rc86/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/util-linux')
-rw-r--r--sys-apps/util-linux/ChangeLog6
-rw-r--r--sys-apps/util-linux/files/util-linux-2.18-falloc.patch34
-rw-r--r--sys-apps/util-linux/util-linux-2.18-r1.ebuild3
3 files changed, 41 insertions, 2 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog
index 938cd4b441a8..a729cbb6a4a8 100644
--- a/sys-apps/util-linux/ChangeLog
+++ b/sys-apps/util-linux/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-apps/util-linux
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.320 2010/09/18 16:29:29 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.321 2010/10/03 20:09:58 vapier Exp $
+
+ 03 Oct 2010; Mike Frysinger <vapier@gentoo.org> util-linux-2.18-r1.ebuild,
+ +files/util-linux-2.18-falloc.patch:
+ Fix building with older linux/falloc.h #339432 by Andrew Randrianasulu.
18 Sep 2010; Raúl Porcel <armin76@gentoo.org> util-linux-2.17.2.ebuild:
ia64/s390/sh/sparc stable wrt #326339
diff --git a/sys-apps/util-linux/files/util-linux-2.18-falloc.patch b/sys-apps/util-linux/files/util-linux-2.18-falloc.patch
new file mode 100644
index 000000000000..fd302905d38c
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.18-falloc.patch
@@ -0,0 +1,34 @@
+From a58285bfb1e37b87c7a85afaead9c9496bc1badb Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 3 Oct 2010 15:58:12 -0400
+Subject: [PATCH] fallocate: fix build failure with old linux headers
+
+If linux/falloc.h does not exist, the build system still enables the
+fallocate util, but ultimately fails when it tries to include the
+header and use a define from it.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ sys-utils/fallocate.c | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
+index d1f43c2..fd4d2a9 100644
+--- a/sys-utils/fallocate.c
++++ b/sys-utils/fallocate.c
+@@ -37,7 +37,11 @@
+ # include <sys/syscall.h>
+ #endif
+
+-#include <linux/falloc.h> /* for FALLOC_FL_* flags */
++#ifdef HAVE_LINUX_FALLOC_H
++# include <linux/falloc.h> /* for FALLOC_FL_* flags */
++#else
++# define FALLOC_FL_KEEP_SIZE 1
++#endif
+
+ #include "nls.h"
+ #include "strtosize.h"
+--
+1.7.3
+
diff --git a/sys-apps/util-linux/util-linux-2.18-r1.ebuild b/sys-apps/util-linux/util-linux-2.18-r1.ebuild
index f478eaf37ca0..693478cf078d 100644
--- a/sys-apps/util-linux/util-linux-2.18-r1.ebuild
+++ b/sys-apps/util-linux/util-linux-2.18-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.18-r1.ebuild,v 1.1 2010/07/19 21:50:36 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.18-r1.ebuild,v 1.2 2010/10/03 20:09:58 vapier Exp $
EAPI="2"
@@ -50,6 +50,7 @@ src_prepare() {
epatch "${FILESDIR}"/${P}-ncursesw.patch
epatch "${FILESDIR}"/${P}-slang.patch #326373
epatch "${FILESDIR}"/${P}-cfdisk-string-len.patch #328959
+ epatch "${FILESDIR}"/${P}-falloc.patch #339432
elibtoolize
}