# --- SDE-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../e2fsprogs/e2fsprogs-1.42-no-fallocate.patch # Copyright (C) 2012 The OpenSDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- SDE-COPYRIGHT-NOTE-END --- From 19a6795685b1c8e855766f76e96d17a8b5398a59 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Sat, 14 Jan 2012 10:41:48 +0100 Subject: [PATCH] libext2fs: fix build in case the libc is not providing fallocate() Without this patch compiling e2fsprogs 1.42 fails in the case the linux kernel headers provide linux/falloc.h but the libc is not implementing fallocate() as it is still the case with latest versions of uClibc. ----------------------------snip----------------------------------------- LD e2fsck ../lib/libext2fs.so: undefined reference to `fallocate' collect2: ld returned 1 exit status ----------------------------snip----------------------------------------- The above build log snippet is from a build using linux 3.0.16 kernel headers and uClibc 0.9.32.1 --- lib/ext2fs/unix_io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c index 5337022..6ee5837 100644 --- a/lib/ext2fs/unix_io.c +++ b/lib/ext2fs/unix_io.c @@ -895,7 +895,7 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block, goto unimplemented; #endif } else { -#ifdef FALLOC_FL_PUNCH_HOLE +#if defined HAVE_FALLOCATE && defined FALLOC_FL_PUNCH_HOLE /* * If we are not on block device, try to use punch hole * to reclaim free space. -- 1.7.2.3