https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127914
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> --- (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.
