+diff --git a/lib/gdi/epng.cpp b/lib/gdi/epng.cpp
+index d8c1982..2ba5a12 100644
+--- a/lib/gdi/epng.cpp
++++ b/lib/gdi/epng.cpp
+@@ -1,4 +1,5 @@
+ #define PNG_SKIP_SETJMP_CHECK
++#include <zlib.h>
+ #include <png.h>
+ #include <stdio.h>
+ #include <lib/gdi/epng.h>
+@@ -52,7 +53,7 @@ int loadPNG(ePtr<gPixmap> &result, const char *filename)
+ fclose(fp);
+ return 0;
+ }
+- if (setjmp(png_ptr->jmpbuf))
++ if ( setjmp(png_jmpbuf(png_ptr)) )
+ {
+ eDebug("das war wohl nix");
+ png_destroy_read_struct(&png_ptr, &info_ptr, &end_info);
+@@ -145,7 +146,7 @@ int loadPNG(ePtr<gPixmap> &result, const char *filename)
+ for (pass = 0; pass < number_passes; pass++)
+ for (int y = 0; y < height; y++)
+ {
+- png_read_rows(png_ptr, &rowptr[y], png_bytepp_NULL, 1);
++ png_read_rows(png_ptr, &rowptr[y], NULL, 1);
+ }
+
+ /*
+@@ -323,7 +324,7 @@ int savePNG(const char *filename, gPixmap *pixmap)
+ PNG_COLOR_TYPE_RGB_ALPHA,
+ PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
+
+- if (setjmp(png_ptr->jmpbuf))
++ if ( setjmp(png_jmpbuf(png_ptr)) )
+ {
+ eDebug("error :/");
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+diff --git a/lib/gdi/picload.cpp b/lib/gdi/picload.cpp
+index 2afebd5..ab7a0b5 100644
+--- a/lib/gdi/picload.cpp
++++ b/lib/gdi/picload.cpp
+@@ -280,7 +280,7 @@ static unsigned char *png_load(const char *file, int *ox, int *oy, int *_bypp)
+ return NULL;
+ }
+
+- if (setjmp(png_ptr->jmpbuf))
++ if (setjmp(png_jmpbuf(png_ptr)))
+ {
+ png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL);
+ fclose(fh);