summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-12-28 15:41:53 -0800
committerSteve Dower <steve.dower@microsoft.com>2016-12-28 15:41:53 -0800
commit52063a547b63c684f757839905b6d96da9b32c36 (patch)
tree09f07f8f082eeaba3e9da31f1dd2830acbf4a6f0 /Modules
parent7ce123091035f6784dd2f05c7807be9d758e9ba1 (diff)
parent6ed09e25a422f7eb9093c248769b763ca823c144 (diff)
downloadcpython-52063a547b63c684f757839905b6d96da9b32c36.tar.gz
Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/fileio.c3
-rw-r--r--Modules/main.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
index 69e35180d7..f454d3c0ac 100644
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -9,6 +9,9 @@
#ifdef HAVE_SYS_STAT_H
#include <sys/stat.h>
#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
diff --git a/Modules/main.c b/Modules/main.c
index 8691d153d7..020c353e0c 100644
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -7,6 +7,9 @@
#if defined(MS_WINDOWS) || defined(__CYGWIN__)
#include <windows.h>
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif