1 |
vapier 12/03/05 05:40:58 |
2 |
|
3 |
Added: e2fsprogs-1.42-no-fallocate.patch |
4 |
Log: |
5 |
Fix building on older glibcs w/out fallocate #406609 by Ortwin Glueck. |
6 |
|
7 |
(Portage version: 2.2.0_alpha86/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-fs/e2fsprogs/files/e2fsprogs-1.42-no-fallocate.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/e2fsprogs/files/e2fsprogs-1.42-no-fallocate.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/e2fsprogs/files/e2fsprogs-1.42-no-fallocate.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: e2fsprogs-1.42-no-fallocate.patch |
16 |
=================================================================== |
17 |
https://bugs.gentoo.org/406609 |
18 |
|
19 |
From 1a36d2ead2f45a21f74ccc332a534c1b788d6029 Mon Sep 17 00:00:00 2001 |
20 |
From: Mike Frysinger <vapier@g.o> |
21 |
Date: Mon, 5 Mar 2012 00:35:21 -0500 |
22 |
Subject: [PATCH] libext2fs: check for fallocate symbol before using it |
23 |
|
24 |
If we have newer kernel headers which define FALLOC_FL_PUNCH_HOLE, but we |
25 |
are on an older glibc which lacks fallocate, we end up trying to use the |
26 |
func anyways. Check the ifdef that autoconf already set up for us. |
27 |
|
28 |
Reported-by: Ortwin Glueck <odi@×××.ch> |
29 |
Signed-off-by: Mike Frysinger <vapier@g.o> |
30 |
--- |
31 |
lib/ext2fs/unix_io.c | 2 +- |
32 |
1 files changed, 1 insertions(+), 1 deletions(-) |
33 |
|
34 |
diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c |
35 |
index 9f0613a..da3f8fd 100644 |
36 |
--- a/lib/ext2fs/unix_io.c |
37 |
+++ b/lib/ext2fs/unix_io.c |
38 |
@@ -905,7 +905,7 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block, |
39 |
goto unimplemented; |
40 |
#endif |
41 |
} else { |
42 |
-#ifdef FALLOC_FL_PUNCH_HOLE |
43 |
+#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_PUNCH_HOLE) |
44 |
/* |
45 |
* If we are not on block device, try to use punch hole |
46 |
* to reclaim free space. |
47 |
-- |
48 |
1.7.8.4 |