From: Victor Stinner Date: Mon, 10 Dec 2018 15:01:03 +0000 (+0100) Subject: [2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078) X-Git-Tag: v2.7.16rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2632df4c3f48f23af85a60bffc61030d52e83ee2;p=thirdparty%2FPython%2Fcpython.git [2.7] bpo-31374: Include pyconfig.h earlier in expat (GH-11078) Include ealier in Modules/expat/xmlparse.c to define properly _POSIX_C_SOURCE and _XOPEN_SOURCE. --- diff --git a/Modules/expat/xmlparse.c b/Modules/expat/xmlparse.c index c4f3ffc215c9..2a763451a3ec 100644 --- a/Modules/expat/xmlparse.c +++ b/Modules/expat/xmlparse.c @@ -30,6 +30,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#if !defined(_WIN32) && defined(HAVE_EXPAT_CONFIG_H) +# include +#endif #if !defined(_GNU_SOURCE) # define _GNU_SOURCE 1 /* syscall prototype */ #endif diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c index fa35de71324c..6371a350dadf 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -30,7 +30,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include +#if !defined(_WIN32) && defined(HAVE_EXPAT_CONFIG_H) +# include +#endif #include #include /* memcpy */