summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-10 03:38:55 -0800
committerGitHub <noreply@github.com>2018-12-10 03:38:55 -0800
commit7bbf7b02ab0852aa757505a7e4062eb52817037a (patch)
treea15ee557dddce42e0eec509e5c346bddc5b62c7e
parentcecf313d1ef4adc0ee5338dd0ca9be0b98302c87 (diff)
downloadcpython-git-7bbf7b02ab0852aa757505a7e4062eb52817037a.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>
-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 */