Also on other platforms use -pthread for compiling commands not just linking because I noticed in the gcc(1) man page -pthread Adds support for multithreading with the pthreads library. This option sets flags for both the preprocessor and linker. Removing the errno check in deps/coupling because it was a hack (e165859) added to fix stdio problems. Without adding -threads, errno is not thread local, and coupling was not correctly checking the errno. It appears -mt does nothing to gcc/solaris.
Experiencing strange errors on all platforms due to this commit. EG http://buildbot.nodejs.org:8010/builders/Linux%20AMD64/builds/107/steps/shell_2/logs/stdio This reverts commit 40ea061.