]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/internal/xcoff: don't use io.SeekCurrent for go1.4 compatibility
authorTobias Klauser <tklauser@distanz.ch>
Fri, 19 Oct 2018 16:09:42 +0000 (18:09 +0200)
committerIan Lance Taylor <iant@golang.org>
Sun, 21 Oct 2018 16:32:01 +0000 (16:32 +0000)
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>
src/cmd/internal/xcoff/file.go

index 86a85c388c7b99a93e536142a02f98938a363251..0923b9fcf3a59a85d8f038499029411201974610 100644 (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
                }
        }