From d4ce24b3af7d492ec4ea47f8efa4fdf69598264a Mon Sep 17 00:00:00 2001 From: bol-van Date: Sat, 14 Sep 2024 21:00:39 +0300 Subject: [PATCH] tpws: fix resolver min stack size on some archs --- tpws/resolver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tpws/resolver.c b/tpws/resolver.c index 52fdd8e..b9c204f 100644 --- a/tpws/resolver.c +++ b/tpws/resolver.c @@ -214,11 +214,13 @@ bool resolver_init(int threads, int fd_signal_pipe) pthread_attr_t attr; if (pthread_attr_init(&attr)) goto ex; // set minimum thread stack size - if (pthread_attr_setstacksize(&attr,20480)) + + if (pthread_attr_setstacksize(&attr,PTHREAD_STACK_MIN>20480 ? PTHREAD_STACK_MIN : 20480)) { pthread_attr_destroy(&attr); goto ex; } + for(t=0, resolver.threads=threads ; t