From f85dbfc3d21e5a650468f20547175107b3bf319b Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 28 Dec 2016 15:41:09 -0800 Subject: [PATCH] Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto --- Misc/ACKS | 3 ++- Misc/NEWS | 6 ++++++ Modules/_io/fileio.c | 3 +++ Modules/main.c | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Misc/ACKS b/Misc/ACKS index 223b3a8be52..647d59de0a5 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1548,6 +1548,7 @@ Robert Xiao Florent Xicluna Alakshendra Yadav Hirokazu Yamamoto +Masayuki Yamamoto Ka-Ping Yee Jason Yeo EungJun Yi @@ -1574,4 +1575,4 @@ Tarek Ziadé Jelle Zijlstra Gennadiy Zlobin Peter Åstrand -Dhushyanth Ramasamy \ No newline at end of file +Dhushyanth Ramasamy diff --git a/Misc/NEWS b/Misc/NEWS index 2a211ddbc2c..2be14345a43 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -42,6 +42,12 @@ Library - Issue #28925: cPickle now correctly propagates errors when unpickle instances of old-style classes. +Build +----- + +- Issue #28768: Fix implicit declaration of function _setmode. Patch by + Masayuki Yamamoto + What's New in Python 2.7.13 =========================== diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 0678ef8e354..4a71a57ec0d 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -8,6 +8,9 @@ #ifdef HAVE_SYS_STAT_H #include #endif +#ifdef HAVE_IO_H +#include +#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/Modules/main.c b/Modules/main.c index 44217c67ca8..73e87e08fd4 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -10,6 +10,9 @@ #endif #if defined(MS_WINDOWS) || defined(__CYGWIN__) +#ifdef HAVE_IO_H +#include +#endif #ifdef HAVE_FCNTL_H #include #endif