From 151cbaf666f00ef2688b44c77ab04d533c36917c Mon Sep 17 00:00:00 2001 From: Callum Lerwick Date: Wed, 20 Nov 2019 09:56:33 -0800 Subject: [PATCH] Fix crash on 386 --- http/server.go | 4 ++-- make.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/http/server.go b/http/server.go index b001e18..febf5c7 100644 --- a/http/server.go +++ b/http/server.go @@ -206,6 +206,8 @@ var ( // A conn represents the server side of an HTTP connection. type conn struct { + curState struct{ atomic uint64 } // packed (unixtime<<8|uint8(ConnState)) + // server is the server on which the connection arrived. // Immutable; never nil. server *Server @@ -245,8 +247,6 @@ type conn struct { lastMethod string curReq atomic.Value // of *response (which has a Request in it) - - curState struct{ atomic uint64 } // packed (unixtime<<8|uint8(ConnState)) } // This should be >= 512 bytes for DetectContentType, diff --git a/make.sh b/make.sh index 9e60f74..a2c53fc 100644 --- a/make.sh +++ b/make.sh @@ -1,3 +1,3 @@ #!/bin/bash -go build -gcflags "-m" -ldflags="-s -w" +GOARCH=386 go build -gcflags "-m" -ldflags="-s -w" strip -s --strip-unneeded -R .comment -R .note -R .note.ABI-tag ezhttpd.exe