diff --git a/_webp.c b/_webp.c index a8c6d40af..c45d1ff77 100644 --- a/_webp.c +++ b/_webp.c @@ -1,5 +1,6 @@ #define PY_SSIZE_T_CLEAN #include +#include "Imaging.h" #include "py3.h" #include #include diff --git a/libImaging/ImPlatform.h b/libImaging/ImPlatform.h index a04bd9dcd..71c2e0d8e 100644 --- a/libImaging/ImPlatform.h +++ b/libImaging/ImPlatform.h @@ -9,6 +9,11 @@ #include "Python.h" +/* Workaround issue #2479 */ +#if PY_VERSION_HEX < 0x03070000 && defined(PySlice_GetIndicesEx) +#undef PySlice_GetIndicesEx +#endif + /* Check that we have an ANSI compliant compiler */ #ifndef HAVE_PROTOTYPES #error Sorry, this library requires support for ANSI prototypes. diff --git a/path.c b/path.c index 824fbdd89..4715e0679 100644 --- a/path.c +++ b/path.c @@ -27,6 +27,7 @@ #include "Python.h" +#include "Imaging.h" #include