diff options
author | Ian Lance Taylor <iant@golang.org> | 2017-01-19 22:04:45 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2017-01-20 21:12:19 +0000 |
commit | ec654e2251f0104ee63eff57fba2749da2f177e5 (patch) | |
tree | 8c1c56364cb6e78ff1732bf128edc022b8809a07 | |
parent | 256a605faa10bc5507597c4669cc5bc400bf487a (diff) | |
download | go-ec654e2251f0104ee63eff57fba2749da2f177e5.tar.gz go-ec654e2251f0104ee63eff57fba2749da2f177e5.zip |
misc/cgo/test: fix test when using GCC 7
With GCC 7 (not yet released), cgo fails with errors like
./sigaltstack.go:65:8: call of non-function C.restoreSignalStack
I do not know precisely why. Explicitly declaring that there are no
arguments to the static function is a simple fix for the debug info.
Change-Id: Id96e1cb1e55ee37a9f1f5ad243d7ee33e71584ac
Reviewed-on: https://go-review.googlesource.com/35480
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-rw-r--r-- | misc/cgo/test/sigaltstack.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/cgo/test/sigaltstack.go b/misc/cgo/test/sigaltstack.go index b16adc7d88..2b7a1ec9ad 100644 --- a/misc/cgo/test/sigaltstack.go +++ b/misc/cgo/test/sigaltstack.go @@ -17,7 +17,7 @@ package cgotest static stack_t oss; static char signalStack[SIGSTKSZ]; -static void changeSignalStack() { +static void changeSignalStack(void) { stack_t ss; memset(&ss, 0, sizeof ss); ss.ss_sp = signalStack; @@ -29,7 +29,7 @@ static void changeSignalStack() { } } -static void restoreSignalStack() { +static void restoreSignalStack(void) { #if (defined(__x86_64__) || defined(__i386__)) && defined(__APPLE__) // The Darwin C library enforces a minimum that the kernel does not. // This is OK since we allocated this much space in mpreinit, @@ -42,7 +42,7 @@ static void restoreSignalStack() { } } -static int zero() { +static int zero(void) { return 0; } */ |