From 3c8e29c81b789db8a49616e0d36d16f869cf442a Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 8 Mar 2021 15:23:40 -0800 Subject: [PATCH] runtime: cast SIGSTKSZ to uintptr PR go/99458 * libgo/runtime/proc.c: cast SIGSTKSZ to uintptr In newer versions of glibc it is long, which causes a signed comparison warning. --- libgo/runtime/proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 274ce01c0bf1..6f7d2e27996f 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -799,8 +799,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 } -- 2.47.2