From a8c71d089d2faffdbc8d615f0908ee26b5cc00cf Mon Sep 17 00:00:00 2001 From: Nicolas F Date: Sat, 15 Aug 2015 23:50:40 +0200 Subject: [PATCH] Fix mingw-w64 build On Windows with mingw-w64, Pillow includes windows.h, and thus including Imaging.h would result in a name conflict of "TRANSPARENT", which windows.h #defines but overviewer.h wants to use as enum. For the record, this used to not be broken back when I initially fixed Pillow for mingw-w64, so the change got somewhere introduced between then and now. --- overviewer_core/src/overviewer.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/overviewer_core/src/overviewer.h b/overviewer_core/src/overviewer.h index 873dcaa..5860245 100644 --- a/overviewer_core/src/overviewer.h +++ b/overviewer_core/src/overviewer.h @@ -32,6 +32,8 @@ #include #include #include +/* Fix Pillow on mingw-w64 which includes windows.h in Imaging.h */ +#undef TRANSPARENT /* like (a * b + 127) / 255), but much faster on most platforms from PIL's _imaging.c */