* libgo patch committed: Fix offset handling in syscall.Sendfile
@ 2015-11-21 5:36 Ian Lance Taylor
0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2015-11-21 5:36 UTC (permalink / raw)
To: gcc-patches, gofrontend-dev
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
PR 66378 points out that syscall.Sendfile does not correct handle an
offset argument: it ignored the initial value. This patch fixes the
problem. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu.
Committed to mainline and GCC 5 branch.
Ian
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 1285 bytes --]
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 230695)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-81dcb1ba4de82a6c9325cb322d5a832a6b1f168d
+97ec885c715b3922b0866c081554899b8d50933a
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: libgo/go/syscall/libcall_bsd.go
===================================================================
--- libgo/go/syscall/libcall_bsd.go (revision 230463)
+++ libgo/go/syscall/libcall_bsd.go (working copy)
@@ -17,6 +17,7 @@ func Sendfile(outfd int, infd int, offse
var soff Offset_t
var psoff *Offset_t
if offset != nil {
+ soff = Offset_t(*offset)
psoff = &soff
}
written, err = sendfile(outfd, infd, psoff, count)
Index: libgo/go/syscall/libcall_linux.go
===================================================================
--- libgo/go/syscall/libcall_linux.go (revision 230463)
+++ libgo/go/syscall/libcall_linux.go (working copy)
@@ -327,6 +327,7 @@ func Sendfile(outfd int, infd int, offse
var soff Offset_t
var psoff *Offset_t
if offset != nil {
+ soff = Offset_t(*offset)
psoff = &soff
}
written, err = sendfile(outfd, infd, psoff, count)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-21 4:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-21 5:36 libgo patch committed: Fix offset handling in syscall.Sendfile Ian Lance Taylor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).