/[gentoo-x86]/sys-fs/e2fsprogs/files/e2fsprogs-1.42-no-fallocate.patch
Gentoo

Contents of /sys-fs/e2fsprogs/files/e2fsprogs-1.42-no-fallocate.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Mar 5 05:40:58 2012 UTC (2 years, 7 months ago) by vapier
Branch: MAIN
Fix building on older glibcs w/out fallocate #406609 by Ortwin Glueck.

(Portage version: 2.2.0_alpha86/cvs/Linux x86_64)

1 https://bugs.gentoo.org/406609
2
3 From 1a36d2ead2f45a21f74ccc332a534c1b788d6029 Mon Sep 17 00:00:00 2001
4 From: Mike Frysinger <vapier@gentoo.org>
5 Date: Mon, 5 Mar 2012 00:35:21 -0500
6 Subject: [PATCH] libext2fs: check for fallocate symbol before using it
7
8 If we have newer kernel headers which define FALLOC_FL_PUNCH_HOLE, but we
9 are on an older glibc which lacks fallocate, we end up trying to use the
10 func anyways. Check the ifdef that autoconf already set up for us.
11
12 Reported-by: Ortwin Glueck <odi@odi.ch>
13 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 ---
15 lib/ext2fs/unix_io.c | 2 +-
16 1 files changed, 1 insertions(+), 1 deletions(-)
17
18 diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
19 index 9f0613a..da3f8fd 100644
20 --- a/lib/ext2fs/unix_io.c
21 +++ b/lib/ext2fs/unix_io.c
22 @@ -905,7 +905,7 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block,
23 goto unimplemented;
24 #endif
25 } else {
26 -#ifdef FALLOC_FL_PUNCH_HOLE
27 +#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_PUNCH_HOLE)
28 /*
29 * If we are not on block device, try to use punch hole
30 * to reclaim free space.
31 --
32 1.7.8.4

  ViewVC Help
Powered by ViewVC 1.1.20