NTP 4.2.8p15 fails build with glibc 2.34: error: missing binary operator before token "("

NTP 4.2.8p15 fails build with glibc 2.34: error: missing binary operator before token "("

我正在使用 glibc 2.34 构建 NTP 4.2.8p15。 构建失败并出现错误:

In file included from /usr/include/pthread.h:33,
                 from work_thread.c:13:
work_thread.c:45:57: error: missing binary operator before token "("
   45 | #if defined(PTHREAD_STACK_MIN) && THREAD_MINSTACKSIZE < PTHREAD_STACK_MIN
      |                                                         ^~~~~~~~~~~~~~~~~

问题在这里得到解答: https://bugs.archlinux.org/task/74690

Since glibc 2.34 PTHREAD_STACK_MIN is no longer a compile time constant so can not be used in preprocessor comparisons which causes the compilation failure [1]. The fix attached to the upstream bug report [2] resolves the issue.

Additional info:

要解决此构建问题,请将 link 中的补丁应用于 NTP。