OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.0 KiB

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