e2fsprogs-fallocate.patch 767 B

12345678910111213141516171819202122
  1. We assume that fallocate is supported somehow
  2. but we need to check if we have fallocate()
  3. this problem shows up on uclibc systems since
  4. uclibc does not have fallocate() implemented
  5. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  6. Upstream-Status: Pending
  7. Index: e2fsprogs-1.42/lib/ext2fs/unix_io.c
  8. ===================================================================
  9. --- e2fsprogs-1.42.orig/lib/ext2fs/unix_io.c 2012-01-17 17:24:34.290780625 -0800
  10. +++ e2fsprogs-1.42/lib/ext2fs/unix_io.c 2012-01-17 17:25:37.338783680 -0800
  11. @@ -895,7 +895,7 @@
  12. goto unimplemented;
  13. #endif
  14. } else {
  15. -#ifdef FALLOC_FL_PUNCH_HOLE
  16. +#if defined FALLOC_FL_PUNCH_HOLE && defined HAVE_FALLOCATE
  17. /*
  18. * If we are not on block device, try to use punch hole
  19. * to reclaim free space.