From eac78d8cd59e76c48615dc5814abc5f10319a415 Mon Sep 17 00:00:00 2001 From: Niklas Wolber Date: Wed, 18 Feb 2015 12:00:10 +0100 Subject: [PATCH] fix struct alignment for ARM builds --- connection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/connection.go b/connection.go index 076abd38..50ddf064 100644 --- a/connection.go +++ b/connection.go @@ -28,6 +28,7 @@ type Response struct { type Connection struct { conn net.Conn opts *ConnectOpts + _ [4]byte token int64 cursors map[int64]*Cursor bad bool @@ -164,6 +165,7 @@ func (c *Connection) sendQuery(q Query) error { // getToken generates the next query token, used to number requests and match // responses with requests. func (c *Connection) nextToken() int64 { + // requires c.token to be 64-bit aligned on ARM return atomic.AddInt64(&c.token, 1) }