From: bentoo <bentoo@overlay>
Subject: Fix memchr conflict with glibc 2.38+

glibc 2.38+ defines memchr as a _Generic macro. NTP's l_stdlib.h
unconditionally declares extern void *memchr(...) when HAVE_MEMCHR is
not defined (which is always, since configure never sets it), causing
a compilation error when the macro expands inside the declaration.

Guard the declaration with #ifndef memchr to skip it when glibc already
provides memchr as a macro.

--- a/include/l_stdlib.h
+++ b/include/l_stdlib.h
@@ -221,8 +221,10 @@
 extern	int	h_errno;
 #endif

+#ifndef memchr
 #ifndef HAVE_MEMCHR
 extern void *memchr(const void *s, int c, size_t n);
 #endif
+#endif

 #ifndef HAVE_STRNLEN
