git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
FreeBSD: fix sendfile shim
[exim.git]
/
src
/
OS
/
os.c-FreeBSD
diff --git
a/src/OS/os.c-FreeBSD
b/src/OS/os.c-FreeBSD
index cb0b0bf7fb5f190a8a6c72317e350014c081e389..38df91cf4f0e79da324d74df8ba029931c2c52c0 100644
(file)
--- a/
src/OS/os.c-FreeBSD
+++ b/
src/OS/os.c-FreeBSD
@@
-19,7
+19,7
@@
os_sendfile(int out, int in, off_t * offp, size_t cnt)
off_t loff = *offp, written;
if (sendfile(in, out, loff, cnt, NULL, &written, 0) < 0) return (ssize_t)-1;
-*offp = loff + written;
+
if (offp)
*offp = loff + written;
return (ssize_t)written;
}