the old way of accessing errno was to simply do 'extern int errno;' ... as we found out with glibc-2.3.2, the libc guys have no problem breaking this since no one ever said it was a standard :) the proper way to access errno is via #include <errno.h> the simple fix is to replace the 'extern int errno;' from linux/unistd.h with '#include <errno.h>' the reason no one has noticed before is two fold ... if you #include <errno.h> at some point, bits/errno.h defines a macro for 'errno' which glosses over the issue in unistd.h ... the other reason is that older binutils did not contain strict checks to verify TLS linking while newer ones do we can see this issue manifest itself in Bug 93419 where <linux/unistd.h> is included, <errno.h> is *not* included, and the build fails with newer binutils due to a TLS issue
that header subtly break glibc, I can experience such problem trying to build valgrind on ppc
Fixed in 2.6.11-r1, thanks!
This bug, while fixed in sys-kernel/linux-headers long ago, is still present in the latest sys-kernel/mips-headers (2.6.11-r1).
considering mips-headers is a sep package maintained by someone else, you should file a new bug about the issue for the mips team to fix
*** Bug 113991 has been marked as a duplicate of this bug. ***