You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
988 B

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