From dd4aecf4a6e775e43ec643e885cdb1598586d077 Mon Sep 17 00:00:00 2001 From: Kirill Ponomarev Date: Fri, 9 Apr 2004 16:43:23 +0000 Subject: - Add a vendor patch that corrects a problem with sendfile(2) on -CURRENT for zero sized files PR: ports/65358 Submitted by: maintainer --- devel/libowfat/Makefile | 1 + devel/libowfat/files/patch-io-iob_addfile.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 devel/libowfat/files/patch-io-iob_addfile.c (limited to 'devel/libowfat') diff --git a/devel/libowfat/Makefile b/devel/libowfat/Makefile index 6d9580b4cc34..1fde5c1ecea5 100644 --- a/devel/libowfat/Makefile +++ b/devel/libowfat/Makefile @@ -7,6 +7,7 @@ PORTNAME= libowfat PORTVERSION= 0.19.2 +PORTREVISION= 1 CATEGORIES= devel ipv6 MASTER_SITES= http://dl.fefe.de/ diff --git a/devel/libowfat/files/patch-io-iob_addfile.c b/devel/libowfat/files/patch-io-iob_addfile.c new file mode 100644 index 000000000000..88d016c0e928 --- /dev/null +++ b/devel/libowfat/files/patch-io-iob_addfile.c @@ -0,0 +1,19 @@ +Index: io/iob_addfile.c +=================================================================== +RCS file: /cvs/libowfat/io/iob_addfile.c,v +retrieving revision 1.2 +retrieving revision 1.3 +diff -u -r1.2 -r1.3 +--- io/iob_addfile.c 26 Sep 2003 15:55:44 -0000 1.2 ++++ io/iob_addfile.c 7 Apr 2004 08:38:41 -0000 1.3 +@@ -1,7 +1,9 @@ + #include "iob_internal.h" + + int iob_addfile(io_batch* b,int64 fd,uint64 off,uint64 n) { +- iob_entry* e=array_allocate(&b->b,sizeof(iob_entry), ++ iob_entry* e; ++ if (n==0) return 1; ++ e=array_allocate(&b->b,sizeof(iob_entry), + array_length(&b->b,sizeof(iob_entry))); + if (!e) return 0; + e->type=FROMFILE; -- cgit v1.2.3