[PATCH] windowscodecs: Include system header png.h before Windows headers.

Olivier F. R. Dierick o.dierick at piezo-forte.be
Sat Oct 24 16:10:52 CDT 2020


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50050
Signed-off-by: Olivier F. R. Dierick <o.dierick at piezo-forte.be>
---
 dlls/windowscodecs/libpng.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/windowscodecs/libpng.c b/dlls/windowscodecs/libpng.c
index 201f5c7..93ff6e0 100644
--- a/dlls/windowscodecs/libpng.c
+++ b/dlls/windowscodecs/libpng.c
@@ -25,6 +25,9 @@
 #include "wine/port.h"
 
 #include <stdarg.h>
+#ifdef SONAME_LIBPNG
+#include <png.h>
+#endif
 
 #define NONAMELESSUNION
 
@@ -43,8 +46,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wincodecs);
 
 #ifdef SONAME_LIBPNG
 
-#include <png.h>
-
 static void *libpng_handle;
 #define MAKE_FUNCPTR(f) static typeof(f) * p##f
 MAKE_FUNCPTR(png_create_info_struct);
-- 
2.1.4




More information about the wine-devel mailing list