blob: 372938c6d688f197ce3ddcf983b81538fc88e408 [file] [log] [blame]
Patrick Williams213cb262021-08-07 19:21:33 -05001From 082a504cfcc046c3d8adaae1164268bc94e5108a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 31 Jul 2021 10:51:41 -0700
4Subject: [PATCH] libntp: Do not use PTHREAD_STACK_MIN on glibc
5
6In glibc 2.34+ PTHREAD_STACK_MIN is not a compile-time constant which
7could mean different stack sizes at runtime on different architectures
8and it also causes compile failure. Default glibc thread stack size
9or 64Kb set by ntp should be good in glibc these days.
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libntp/work_thread.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/libntp/work_thread.c b/libntp/work_thread.c
18index 03a5647..3ddd751 100644
19--- a/libntp/work_thread.c
20+++ b/libntp/work_thread.c
21@@ -41,7 +41,7 @@
22 #ifndef THREAD_MINSTACKSIZE
23 # define THREAD_MINSTACKSIZE (64U * 1024)
24 #endif
25-#ifndef __sun
26+#if !defined(__sun) && !defined(__GLIBC__)
27 #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
28 # undef THREAD_MINSTACKSIZE
29 # define THREAD_MINSTACKSIZE PTHREAD_STACK_MIN
30--
312.32.0
32