diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-21 04:43:50 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-21 04:43:50 +0000 |
commit | a974d523f9ed7c4bd73f1e683eeab25e4430f5ac (patch) | |
tree | ecaa7acdd72fcc210b104330ca437612b296928b /libgo/go | |
parent | b3af74d72daabb6b1b4741504bf9ac874070352c (diff) | |
download | gcc-a974d523f9ed7c4bd73f1e683eeab25e4430f5ac.tar.gz |
PR go/66378
syscall: Fix initial offset value in syscall.Sendfile.
Bug reported in https://gcc.gnu.org/PR66378.
Reviewed-on: https://go-review.googlesource.com/17159
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230699 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go')
-rw-r--r-- | libgo/go/syscall/libcall_bsd.go | 1 | ||||
-rw-r--r-- | libgo/go/syscall/libcall_linux.go | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libgo/go/syscall/libcall_bsd.go b/libgo/go/syscall/libcall_bsd.go index 4501f88ad48..f77260854c7 100644 --- a/libgo/go/syscall/libcall_bsd.go +++ b/libgo/go/syscall/libcall_bsd.go @@ -17,6 +17,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e var soff Offset_t var psoff *Offset_t if offset != nil { + soff = Offset_t(*offset) psoff = &soff } written, err = sendfile(outfd, infd, psoff, count) diff --git a/libgo/go/syscall/libcall_linux.go b/libgo/go/syscall/libcall_linux.go index 50b04ff5af9..f0479eb02ee 100644 --- a/libgo/go/syscall/libcall_linux.go +++ b/libgo/go/syscall/libcall_linux.go @@ -327,6 +327,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e var soff Offset_t var psoff *Offset_t if offset != nil { + soff = Offset_t(*offset) psoff = &soff } written, err = sendfile(outfd, infd, psoff, count) |