re PR go/66378 (libgo syscall.Sendfile() does not honor/use offset argument)
authorIan Lance Taylor <ian@gcc.gnu.org>
Sat, 21 Nov 2015 04:43:50 +0000 (04:43 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Sat, 21 Nov 2015 04:43:50 +0000 (04:43 +0000)
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

gcc/go/gofrontend/MERGE
libgo/go/syscall/libcall_bsd.go
libgo/go/syscall/libcall_linux.go

index d03d18eb37cb8295ff0c4727ef9d88d806edce3c..9ee3535a4f7be4f947ae2b0f2803b029e49ce5ec 100644 (file)
@@ -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 4501f88ad481df685b8058355af01fabae33e36a..f77260854c731acb9a30bc4ea6470f5dfd1140bc 100644 (file)
@@ -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)
index 50b04ff5af9493125d568206e3f69dbc586debd8..f0479eb02eeec9df86c9a85d9d761da7133f2ddc 100644 (file)
@@ -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)