packages/net/tgt/patches/010-fallocate.patch
florian 1b3db4a0a1 new package tgt
This patch provides userspace iSCSI target support.

https://dev.openwrt.org/ticket/8798

Signed-off-by: Maxim Storchak <m.storchak@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@40703 3c298f89-4303-0410-b956-a3cf2f4a3e73
2014-05-05 19:31:10 +00:00

15 lines
389 B
Diff

--- tgt-1.0.42/usr/util.h.orig 2013-12-26 16:18:54.000000000 +0200
+++ tgt-1.0.42/usr/util.h 2013-12-26 16:19:10.000000000 +0200
@@ -212,11 +212,6 @@
*/
static inline int unmap_file_region(int fd, off_t offset, off_t length)
{
-#ifdef FALLOC_FL_PUNCH_HOLE
- if (fallocate(fd, FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE,
- offset, length) == 0)
- return 0;
-#endif
return -1;
}