Repository: incubator-mynewt-newt
Updated Branches:
  refs/heads/master d487ce62b -> 4e940c181


MYNEWT-674 newt - Remove use of new io.SeekCurrent

This constant was added in go 1.7. A lot of package manager repos only
carry go 1.6, so the use of this constant makes newt unbuildable for a
lot of users.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/4e940c18
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/4e940c18
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/4e940c18

Branch: refs/heads/master
Commit: 4e940c1811e93fada82af7516f582054c6bf2ec8
Parents: d487ce6
Author: Christopher Collins <[email protected]>
Authored: Thu Mar 16 08:47:33 2017 -0700
Committer: Christopher Collins <[email protected]>
Committed: Thu Mar 16 11:07:38 2017 -0700

----------------------------------------------------------------------
 newt/image/image.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/4e940c18/newt/image/image.go
----------------------------------------------------------------------
diff --git a/newt/image/image.go b/newt/image/image.go
index dd09b16..8e33273 100644
--- a/newt/image/image.go
+++ b/newt/image/image.go
@@ -611,7 +611,8 @@ func (image *Image) Generate(loader *Image) error {
                "Computed Hash for image %s as %s \n",
                image.TargetImg, hex.EncodeToString(image.Hash))
 
-       sz, err := imgFile.Seek(0, io.SeekCurrent)
+       // XXX: Replace "1" with io.SeekCurrent when go 1.7 becomes mainstream.
+       sz, err := imgFile.Seek(0, 1)
        if err != nil {
                return util.FmtNewtError("Failed to calculate file size of 
generated "+
                        "image %s: %s", image.TargetImg, err.Error())

Reply via email to