new package tgt
[openwrt/svn-archive/archive.git] / net / tgt / patches / 010-fallocate.patch
1 --- tgt-1.0.42/usr/util.h.orig 2013-12-26 16:18:54.000000000 +0200
2 +++ tgt-1.0.42/usr/util.h 2013-12-26 16:19:10.000000000 +0200
3 @@ -212,11 +212,6 @@
4 */
5 static inline int unmap_file_region(int fd, off_t offset, off_t length)
6 {
7 -#ifdef FALLOC_FL_PUNCH_HOLE
8 - if (fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
9 - offset, length) == 0)
10 - return 0;
11 -#endif
12 return -1;
13 }
14