summaryrefslogtreecommitdiff
path: root/libgo/runtime/go-signal.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-04 06:18:07 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2012-12-04 06:18:07 +0000
commit50e65818c767077df87ddcf9c4304f495e587e3a (patch)
tree858cd40fe8297597d39434fd8ee7658324d30af5 /libgo/runtime/go-signal.c
parent4f2138d7c4a565dd82d92953535d07742feeb993 (diff)
downloadgcc-50e65818c767077df87ddcf9c4304f495e587e3a.tar.gz
runtime: Fix build failures with -D_FORTIFY_SOURCE=2.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194116 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/runtime/go-signal.c')
-rw-r--r--libgo/runtime/go-signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c
index a1215f947e8..6ac33d7fc1e 100644
--- a/libgo/runtime/go-signal.c
+++ b/libgo/runtime/go-signal.c
@@ -144,10 +144,13 @@ static int8 badsignal[] = "runtime: signal received on thread not created by Go.
static void
runtime_badsignal(int32 sig)
{
+ // Avoid -D_FORTIFY_SOURCE problems.
+ int rv __attribute__((unused));
+
if (sig == SIGPROF) {
return; // Ignore SIGPROFs intended for a non-Go thread.
}
- runtime_write(2, badsignal, sizeof badsignal - 1);
+ rv = runtime_write(2, badsignal, sizeof badsignal - 1);
runtime_exit(1);
}