1
0
mirror of https://github.com/golang/go synced 2024-11-06 16:36:20 -07:00

cmd/internal/xcoff: don't use io.SeekCurrent for go1.4 compatibility

This fixes the build with go1.4 during bootstrap.

Change-Id: I35fa1dc3d877d31d5ffe515f5f19188f4a8b77f4
Reviewed-on: https://go-review.googlesource.com/c/143377
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Tobias Klauser 2018-10-19 18:09:42 +02:00 committed by Ian Lance Taylor
parent 035f9e8102
commit f5df0a9575

View File

@ -355,7 +355,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
// Read csect auxiliary entry (by convention, it is the last).
if !needAuxFcn {
if _, err := sr.Seek(int64(numaux-1)*SYMESZ, io.SeekCurrent); err != nil {
if _, err := sr.Seek(int64(numaux-1)*SYMESZ, os.SEEK_CUR); err != nil {
return nil, err
}
}
@ -382,7 +382,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
f.Symbols = append(f.Symbols, sym)
skip:
i += numaux // Skip auxiliary entries
if _, err := sr.Seek(int64(numaux)*SYMESZ, io.SeekCurrent); err != nil {
if _, err := sr.Seek(int64(numaux)*SYMESZ, os.SEEK_CUR); err != nil {
return nil, err
}
}