mirror of
https://github.com/golang/go
synced 2024-11-22 05:54:40 -07:00
net: fix build (FreeBSD sendfile)
TBR=bradfitz CC=golang-dev https://golang.org/cl/6358043
This commit is contained in:
parent
9525372e31
commit
f009fefd79
@ -72,7 +72,8 @@ func sendFile(c *netFD, r io.Reader) (written int64, err error, handled bool) {
|
||||
if int64(n) > remain {
|
||||
n = int(remain)
|
||||
}
|
||||
n, err1 := syscall.Sendfile(dst, src, pos, n)
|
||||
pos1 := pos
|
||||
n, err1 := syscall.Sendfile(dst, src, &pos1, n)
|
||||
if n > 0 {
|
||||
pos += int64(n)
|
||||
written += int64(n)
|
||||
|
Loading…
Reference in New Issue
Block a user