only use _SC_SIGSTKSZ when it's defined

This commit is contained in:
nick black 2025-01-02 11:49:24 -05:00
parent 4adde8f63d
commit 3a43881b01
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -222,7 +222,11 @@ int setup_signals(void* vnc, bool no_quit_sigs, bool no_winch_sigs,
// to export ASAN_OPTIONS=use_sigaltstack=0, or just not fuck with the alternate
// signal stack when built with ASAN.
#ifndef USE_ASAN
#ifdef _SC_SIGSTKSZ
long minstksz = sysconf(_SC_SIGSTKSZ);
#else
long minsktkz = 0;
#endif
if(minstksz <= 0){
minstksz = SIGSTKSZ * 4;
}