summaryrefslogtreecommitdiff
path: root/Modules/expat/xmltok.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-10 03:28:13 -0800
committerGitHub <noreply@github.com>2018-12-10 03:28:13 -0800
commit1467a3ac121897c2ad7512d664478d8916a35217 (patch)
treeee0d717d833be8a6f9b0028db0f2fc69cacb5b40 /Modules/expat/xmltok.c
parent1a7b62d5571b3742e706d247dfe6509f68f1409d (diff)
downloadcpython-git-1467a3ac121897c2ad7512d664478d8916a35217.tar.gz
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@redhat.com>
Diffstat (limited to 'Modules/expat/xmltok.c')
-rw-r--r--Modules/expat/xmltok.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/expat/xmltok.c b/Modules/expat/xmltok.c
index 6b415d8397..fa35de7132 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 */