Marc-Andre Lemburg has found the culprit of the problem in r57142.
diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h
index 9c9b694..b41a040 100644
--- a/Modules/socketmodule.h
+++ b/Modules/socketmodule.h
@@ -8,7 +8,7 @@
 #   include <sys/socket.h>
 # endif
 # include <netinet/in.h>
-# if defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP))
+# if !(defined(__CYGWIN__) || (defined(PYOS_OS2) && defined(PYCC_VACPP)))
 #  include <netinet/tcp.h>
 # endif