Commit 4731f878 by Ian Lance Taylor

runtime: Fix build failures with -D_FORTIFY_SOURCE=2.

From-SVN: r194116
parent 3f7af571
......@@ -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);
}
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment