mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
5e83f17dd0
commit
3b29389671
|
|
@ -1,4 +1,4 @@
|
||||||
81dcb1ba4de82a6c9325cb322d5a832a6b1f168d
|
97ec885c715b3922b0866c081554899b8d50933a
|
||||||
|
|
||||||
The first line of this file holds the git revision number of the last
|
The first line of this file holds the git revision number of the last
|
||||||
merge done from the gofrontend repository.
|
merge done from the gofrontend repository.
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
var soff Offset_t
|
var soff Offset_t
|
||||||
var psoff *Offset_t
|
var psoff *Offset_t
|
||||||
if offset != nil {
|
if offset != nil {
|
||||||
|
soff = Offset_t(*offset)
|
||||||
psoff = &soff
|
psoff = &soff
|
||||||
}
|
}
|
||||||
written, err = sendfile(outfd, infd, psoff, count)
|
written, err = sendfile(outfd, infd, psoff, count)
|
||||||
|
|
|
||||||
|
|
@ -327,6 +327,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||||
var soff Offset_t
|
var soff Offset_t
|
||||||
var psoff *Offset_t
|
var psoff *Offset_t
|
||||||
if offset != nil {
|
if offset != nil {
|
||||||
|
soff = Offset_t(*offset)
|
||||||
psoff = &soff
|
psoff = &soff
|
||||||
}
|
}
|
||||||
written, err = sendfile(outfd, infd, psoff, count)
|
written, err = sendfile(outfd, infd, psoff, count)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue