eb5086ae7a
sntp/crypto.c includes sntp/config.h, then sntp/crypto.h which includes ntp_stdlib.h which in turn includes l_stdlib.h that contains #ifndef HAVE_MEMCHR extern void *memchr(const void *s, int c, size_t n); #endif and breaks the build with glibc 2.43. sntp/config.h does not contain any information about memchr() while the top-level config.h does but this top-level config.h is not included because sntp/Makefile lacks -I$(top_builddir) so sntp/config.h gets included which does not define HAVE_MEMCHR although glibc does provide memchr() but sntp/configure lacks a check for memchr(). This was not a problem with previous glibc versions but due to recent C23 changes in glibc the ntp build is now broken. To fix the problem we add a configure check for memchr() to sntp/configure so HAVE_MEMCHR gets defined in sntp/config.h. Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Julien Olivain <ju.o@free.fr>