From d5d3f15a0e04c30d5dbec09b56c14ad923a3e8da Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 8 Mar 2021 13:58:14 -0800 Subject: [PATCH] runtime: cast SIGSTKSZ to uintptr In newer versions of glibc it is long, which causes a signed comparison warning. Fixes PR go/99458 --- gcc/go/gofrontend/MERGE | 2 +- libgo/runtime/proc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 5c9fc7db4e1d..5b45f03a26eb 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -2c5188b5ad6143e791f2ba42f02a4ea7887d87b6 +93380a9126e76b71fa208e62c31c7914084c0e37 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index c037df645b9a..38bf7a6b2551 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -802,8 +802,8 @@ runtime_malg(bool allocatestack, bool signalstack, byte** ret_stack, uintptr* re if(signalstack) { stacksize = 32 * 1024; // OS X wants >= 8K, GNU/Linux >= 2K #ifdef SIGSTKSZ - if(stacksize < SIGSTKSZ) - stacksize = SIGSTKSZ; + if(stacksize < (uintptr)(SIGSTKSZ)) + stacksize = (uintptr)(SIGSTKSZ); #endif }