runtime: cast SIGSTKSZ to uintptr

In newer versions of glibc it is long, which causes a signed
comparison warning.

Fixes PR go/99458
This commit is contained in:
Ian Lance Taylor 2021-03-08 13:58:14 -08:00
parent 6405b40f4a
commit d5d3f15a0e
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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
}