From 4ce1924ebb688e3801fbb71192c1edaa2f96adf2 Mon Sep 17 00:00:00 2001 From: Dave Cheney Date: Tue, 9 Oct 2012 13:15:42 +1100 Subject: [PATCH] go.crypto: various: fix appengine compatibility Fixes golang/go#4102. R=russross, minux.ma, rsc, agl CC=golang-dev https://golang.org/cl/6623053 --- salsa20/salsa/salsa2020_amd64.s | 2 ++ salsa20/salsa/salsa20_amd64.go | 2 ++ salsa20/salsa/salsa20_ref.go | 2 +- ssh/client.go | 2 +- ssh/terminal/util.go | 2 +- 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/salsa20/salsa/salsa2020_amd64.s b/salsa20/salsa/salsa2020_amd64.s index 28850b4..6358149 100644 --- a/salsa20/salsa/salsa2020_amd64.s +++ b/salsa20/salsa/salsa2020_amd64.s @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !appengine + // This code was translated into a form compatible with 6a from the public // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html diff --git a/salsa20/salsa/salsa20_amd64.go b/salsa20/salsa/salsa20_amd64.go index 3ec1188..93d43da 100644 --- a/salsa20/salsa/salsa20_amd64.go +++ b/salsa20/salsa/salsa20_amd64.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// +build !appengine + package salsa // This function is implemented in salsa2020_amd64.s. diff --git a/salsa20/salsa/salsa20_ref.go b/salsa20/salsa/salsa20_ref.go index fffa761..9169134 100644 --- a/salsa20/salsa/salsa20_ref.go +++ b/salsa20/salsa/salsa20_ref.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build !amd64 +// +build !amd64 appengine package salsa diff --git a/ssh/client.go b/ssh/client.go index dabc298..12e1bec 100644 --- a/ssh/client.go +++ b/ssh/client.go @@ -412,7 +412,7 @@ func parseTCPAddr(b []byte) (*net.TCPAddr, []byte, bool) { if ip == nil { return nil, b, false } - return &net.TCPAddr{ip, int(port)}, b, true + return &net.TCPAddr{IP: ip, Port: int(port)}, b, true } // Dial connects to the given network address using net.Dial and diff --git a/ssh/terminal/util.go b/ssh/terminal/util.go index 67b287c..daa36d7 100644 --- a/ssh/terminal/util.go +++ b/ssh/terminal/util.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// +build linux +// +build linux,!appengine // Package terminal provides support functions for dealing with terminals, as // commonly found on UNIX systems.