Include <pyconfig.h> ealier in Modules/expat/xmlparse.c to define properly _POSIX_C_SOURCE and _XOPEN_SOURCE.