diff --git a/Source/NSProcessInfo.m b/Source/NSProcessInfo.m
index 3b5cd5558..dd576d876 100644
--- a/Source/NSProcessInfo.m
+++ b/Source/NSProcessInfo.m
@@ -56,7 +56,7 @@
#include
/* One of these two should have MAXHOSTNAMELEN */
-#ifndef __WIN32__
+#if !defined(__WIN32__) || defined(__CYGWIN__)
#include
#include
#include
@@ -348,7 +348,7 @@ extern char** _environ;
#undef main
int main(int argc, char *argv[], char *env[])
{
-#ifdef __WIN32__
+#if defined(__WIN32__) && !defined(__CYGWIN__)
WSADATA lpWSAData;
// Initialize Windows Sockets
@@ -431,7 +431,7 @@ int main(int argc, char *argv[], char *env[])
int pid;
#if defined(__WIN32__)
- pid = (int)GetCurrentProcessId(),
+ pid = (int)GetCurrentProcessId();
#else
pid = (int)getpid();
#endif
diff --git a/Source/NSRunLoop.m b/Source/NSRunLoop.m
index fd8eb41e6..4b8b82e67 100644
--- a/Source/NSRunLoop.m
+++ b/Source/NSRunLoop.m
@@ -37,7 +37,7 @@
#include
#include
-#ifndef __WIN32__
+#if !defined(__WIN32__) || defiend(__CYGWIN__)
#include
#include
#endif /* !__WIN32__ */