diff options
-rw-r--r-- | libgo/runtime/go-signal.c | 5 | ||||
-rw-r--r-- | libgo/runtime/print.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/libgo/runtime/go-signal.c b/libgo/runtime/go-signal.c index a1215f9..6ac33d7 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); } diff --git a/libgo/runtime/print.c b/libgo/runtime/print.c index 42717bb..9e0c45b 100644 --- a/libgo/runtime/print.c +++ b/libgo/runtime/print.c @@ -18,7 +18,10 @@ gwrite(const void *v, int32 n) G* g = runtime_g(); if(g == nil || g->writebuf == nil) { - runtime_write(2, v, n); + // Avoid -D_FORTIFY_SOURCE problems. + int rv __attribute__((unused)); + + rv = runtime_write(2, v, n); return; } |