diff options
author | marcus <marcus@FreeBSD.org> | 2012-04-29 08:48:35 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2012-04-29 08:48:35 +0800 |
commit | 74432265118ffb304942f7afeeafe89b65036f6e (patch) | |
tree | 2969d997c36f33a454025b61c6dc897216e45719 /net/netatalk | |
parent | 74437b92206efd75bcb3b185a78b0d775f5f5c85 (diff) | |
download | freebsd-ports-graphics-74432265118ffb304942f7afeeafe89b65036f6e.tar.gz freebsd-ports-graphics-74432265118ffb304942f7afeeafe89b65036f6e.tar.zst freebsd-ports-graphics-74432265118ffb304942f7afeeafe89b65036f6e.zip |
Fix usage of sendfile on FreeBSD.
PR: 167380
Submitted by: Daniel Becker <razzfazz@gmail.com>
Obtained from: netatalk git
Diffstat (limited to 'net/netatalk')
-rw-r--r-- | net/netatalk/files/patch-libatalk_adouble_ad_sendfile.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/netatalk/files/patch-libatalk_adouble_ad_sendfile.c b/net/netatalk/files/patch-libatalk_adouble_ad_sendfile.c new file mode 100644 index 00000000000..97437a84584 --- /dev/null +++ b/net/netatalk/files/patch-libatalk_adouble_ad_sendfile.c @@ -0,0 +1,20 @@ +--- libatalk/adouble/ad_sendfile.c.orig 2011-12-05 13:28:30.000000000 +0000 ++++ libatalk/adouble/ad_sendfile.c 2012-04-29 00:47:10.375795000 +0000 +@@ -67,7 +67,16 @@ ssize_t sys_sendfile(int tofd, int fromf + #include <sys/uio.h> + ssize_t sys_sendfile(int tofd, int fromfd, off_t *offset, size_t count) + { +- return sendfile(fromfd, tofd, *offset, count, NULL, offset, 0); ++ off_t len; ++ int ret; ++ ++ ret = sendfile(fromfd, tofd, *offset, count, NULL, &len, 0); ++ ++ *offset += len; ++ ++ if (ret != 0) ++ return -1; ++ return len; + } + + #else |