Seems like at least the mkdir undefined is tied to that.
i think the glibc guys have been working on cleaning up namespace bleeding across includes. so we might continue to see issues like this in the future where people need to include the right headers instead of relying on implicit inclusion. not really a bug specific to glibc, but generally tracked against it since that is our largest used C library ...