mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 02:30:30 +08:00
runtime: Fix build failures with -D_FORTIFY_SOURCE=2.
From-SVN: r194116
This commit is contained in:
parent
3f7af571aa
commit
4731f878b7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user