https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113278
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- newlib certainly implements fileno(): $ nm libc.a|grep fileno libc_a-fileno.o: 00000000 T fileno U fileno libc_a-fileno_u.o: 00000000 T fileno_unlocked U fileno So perhaps the issue is that the prototype is missing (or missing with the default compilation options since it's Posix and I don't think we pass options to enable that by default). Grepping the source, I suspect the former.