https://github.com/python/cpython/commit/7bbf7b02ab0852aa757505a7e4062eb52817037a commit: 7bbf7b02ab0852aa757505a7e4062eb52817037a branch: 2.7 author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com> committer: GitHub <noreply at github.com> date: 2018年12月10日T03:38:55-08:00 summary: bpo-31374: Include pyconfig.h earlier in expat (GH-11064) Include <pyconfig.h> ealier in Modules/expat/xmltok.c to define properly _POSIX_C_SOURCE. Python defines _POSIX_C_SOURCE as 200809L, whereas <features.h> (included indirectly by <string.h>) defines _POSIX_C_SOURCE as 199506L. (cherry picked from commit cf247359d5b7082044eea1fa94b5211a172b1ff6) Co-authored-by: Victor Stinner <vstinner at redhat.com> files: M Modules/expat/xmltok.c diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c index 6b415d83972c..fa35de71324c 100644 --- a/Modules/expat/xmltok.c +++ b/Modules/expat/xmltok.c @@ -30,6 +30,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include <pyconfig.h> #include <stddef.h> #include <string.h> /* memcpy */