diff options
author | Jakob Unterwurzacher | 2021-09-07 12:57:52 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-09-07 18:15:04 +0200 |
commit | 738d5a2b3a001318064be649d683684630eff4c2 (patch) | |
tree | a4a3466bc440af105e7c521d01e4f9fc5c3747cb | |
parent | d9510d0c0ba2ef31145499f4d49ab1d10c03de94 (diff) |
stupidgcm: fix build with CGO_ENABLED=1 without_openssl
We missed some "// +build" lines
-rw-r--r-- | internal/stupidgcm/Makefile | 11 | ||||
-rw-r--r-- | internal/stupidgcm/common.go | 2 | ||||
-rw-r--r-- | internal/stupidgcm/openssl_aead.c | 2 |
3 files changed, 15 insertions, 0 deletions
diff --git a/internal/stupidgcm/Makefile b/internal/stupidgcm/Makefile index 22e3b2e..143819d 100644 --- a/internal/stupidgcm/Makefile +++ b/internal/stupidgcm/Makefile @@ -1,3 +1,14 @@ +.PHONY: test +test: gcc + # All three ways of building this must work + go build + go build -tags without_openssl + CGO_ENABLED=0 go build -tags without_openssl + # Likewise, all three ways of testing this must work + go test -v + go test -v -tags without_openssl + CGO_ENABLED=0 go test -v -tags without_openssl + .PHONY: gcc gcc: gcc -Wall -Wextra -Wformat-security -Wconversion -lcrypto -c *.c diff --git a/internal/stupidgcm/common.go b/internal/stupidgcm/common.go index 3788315..bb100eb 100644 --- a/internal/stupidgcm/common.go +++ b/internal/stupidgcm/common.go @@ -1,3 +1,5 @@ +// +build !without_openssl + package stupidgcm import ( diff --git a/internal/stupidgcm/openssl_aead.c b/internal/stupidgcm/openssl_aead.c index 77898d5..e02466f 100644 --- a/internal/stupidgcm/openssl_aead.c +++ b/internal/stupidgcm/openssl_aead.c @@ -1,3 +1,5 @@ +// +build !without_openssl + #include "openssl_aead.h" #include <openssl/evp.h> #include <stdio.h> |