package/ntp: Fix building with glibc 2.34+
authorAlexey Brodkin <Alexey.Brodkin@synopsys.com>
Mon, 13 Sep 2021 12:59:11 +0000 (15:59 +0300)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Wed, 22 Sep 2021 20:13:24 +0000 (22:13 +0200)
commit44d5f1d05d9cf9dc03af22ae32d31cb3f647a339
tree051f2ecf83a5e7dd3f8bdeb34f89dcd10118b9a6
parent71b83227128be62c169313e85bb8f339f977ad67
package/ntp: Fix building with glibc 2.34+

On attempt to build ntp with glibc 2.34 the following error happens:
-------------------------------->8------------------------------
In file included from .../output/host/lib/gcc/i586-buildroot-linux-gnu/10.3.0/include-fixed/pthread.h:42,
                 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
      |                                                         ^~~~~~~~~~~~~~~~~
-------------------------------->8------------------------------

That's because starting from glibc 2.34 PTHREAD_STACK_MIN gets determined
dynamically in runtime via sysconf(), see [1].

Original fix proposed by Khem Raj in OpenEmbedded, see [2].

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=5d98a7dae955bafa6740c26eaba9c86060ae0344
[2] https://github.com/openembedded/meta-openembedded/commit/7055c764c83150f9310ce04bcfb19330460582fc

Suggested-by: Artem Panfilov <artemp@synopsys.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
package/ntp/0004-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch [new file with mode: 0644]