https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127914
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #12)
> (In reply to Steve Kargl from comment #11)
> > Seems libiberty/config.h is not propagated to other directories.
>
> It's not supposed to be, each configure script produces a separate config.h
>
> If the fix is going to be needed in several places, maybe this is the
> simplest solution:
>
> --- a/include/libiberty.h
> +++ b/include/libiberty.h
> @@ -222,7 +222,7 @@ extern int mkstemps(char *, int);
>
> /* Make memrchr available on systems that do not have it. */
> #if !defined (__GNU_LIBRARY__ ) && !defined (__linux__) && \
> - !defined (HAVE_MEMRCHR)
> + !defined (HAVE_MEMRCHR) && !defined (memrchr)
> extern void *memrchr(const void *, int, size_t);
> #endif
>
> This assumes that if it's defined as a macro, then it exists in libc.
Or it could use
extern void *(memrchr)(const void *, int, size_t);