https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67363
--- Comment #2 from Eric Gallager <egall at gwmail dot gwu.edu> --- Actually on further investigation, libiberty should already provide a strndup implementation, the issue is just that it's not getting picked up here... I'm not sure whether it would be better to put a declaration for it in include/libiberty.h or in gcc/system.h though? Or both? The former seems like the more correct location, but the latter was the one that actually worked, so... I guess I should attach a patch for the latter then? Along with the proper configure changes required for the ifdefs to work properly, that is... (anyways, that's just the strndup part of the issue; I have no clue about the setenv/unsetenv part in the original bug...)