https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117857
--- Comment #1 from Gleb Mazovetskiy <glex.spb at gmail dot com> --- On my macOS 10.4 Tiger PowerPC, /usr/include/unistd.h contains the following: #if __DARWIN_UNIX03 int ttyname_r(int, char *, size_t) __DARWIN_ALIAS(ttyname_r); #else /* !__DARWIN_UNIX03 */ char *ttyname_r(int, char *, size_t); #endif /* __DARWIN_UNIX03 */