git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e445b7
)
FreeBSD: fix sendfile shim, again
author
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 10 Oct 2021 21:20:52 +0000
(22:20 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 11 Oct 2021 09:32:48 +0000
(10:32 +0100)
src/OS/os.c-FreeBSD
patch
|
blob
|
history
diff --git
a/src/OS/os.c-FreeBSD
b/src/OS/os.c-FreeBSD
index 38df91cf4f0e79da324d74df8ba029931c2c52c0..ac833a29f9749386631b5c95348021768148c3d9 100644
(file)
--- a/
src/OS/os.c-FreeBSD
+++ b/
src/OS/os.c-FreeBSD
@@
-16,7
+16,8
@@
Sendfile shim
ssize_t
os_sendfile(int out, int in, off_t * offp, size_t cnt)
{
-off_t loff = *offp, written;
+off_t loff = offp ? *offp : 0;
+off_t written;
if (sendfile(in, out, loff, cnt, NULL, &written, 0) < 0) return (ssize_t)-1;
if (offp) *offp = loff + written;