| 1 | Without this patch compiling e2fsprogs 1.42 fails in the case the linux |
| 2 | kernel headers provide linux/falloc.h but the libc is not implementing |
| 3 | fallocate() as it is still the case with latest versions of uClibc. |
| 4 | |
| 5 | --- a/lib/ext2fs/unix_io.c |
| 6 | +++ b/lib/ext2fs/unix_io.c |
| 7 | @@ -895,7 +895,7 @@ static errcode_t unix_discard(io_channel |
| 8 | goto unimplemented; |
| 9 | #endif |
| 10 | } else { |
| 11 | -#ifdef FALLOC_FL_PUNCH_HOLE |
| 12 | +#if defined HAVE_FALLOCATE && defined FALLOC_FL_PUNCH_HOLE |
| 13 | /* |
| 14 | * If we are not on block device, try to use punch hole |
| 15 | * to reclaim free space. |
| 16 | |