aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-11-21 04:43:50 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-11-21 04:43:50 +0000
commit3b29389671c062edb90a96afda51b6c3ffa7e0d6 (patch)
treeecaa7acdd72fcc210b104330ca437612b296928b /libgo
parent5e83f17dd01ab8f4b12b82588fdd7f75a9cd5650 (diff)
downloadgcc-3b29389671c062edb90a96afda51b6c3ffa7e0d6.zip
gcc-3b29389671c062edb90a96afda51b6c3ffa7e0d6.tar.gz
gcc-3b29389671c062edb90a96afda51b6c3ffa7e0d6.tar.bz2
re PR go/66378 (libgo syscall.Sendfile() does not honor/use offset argument)
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 From-SVN: r230699
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/syscall/libcall_bsd.go1
-rw-r--r--libgo/go/syscall/libcall_linux.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/libgo/go/syscall/libcall_bsd.go b/libgo/go/syscall/libcall_bsd.go
index 4501f88..f772608 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 50b04ff..f0479eb 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)