Browse Source

go.crypto: various: fix appengine compatibility

Fixes golang/go#4102.

R=russross, minux.ma, rsc, agl
CC=golang-dev
https://golang.org/cl/6623053
Dave Cheney 13 years ago
parent
commit
4ce1924ebb

+ 2 - 0
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
 

+ 2 - 0
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.

+ 1 - 1
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
 

+ 1 - 1
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

+ 1 - 1
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.