Patch #1492356: Port to Windows CE (patch set 1).
diff --git a/Modules/main.c b/Modules/main.c
index 28d3294..5a55036 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -10,8 +10,10 @@
 #endif
 
 #if defined(MS_WINDOWS) || defined(__CYGWIN__)
+#ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
+#endif
 
 #if (defined(PYOS_OS2) && !defined(PYCC_GCC)) || defined(MS_WINDOWS)
 #define PYTHONHOMEHELP "<prefix>\\lib"