$OpenBSD: patch-src_IMG_savepng_cpp,v 1.2 2011/08/26 11:30:32 jasper Exp $

Fix build with png-1.5.

--- src/IMG_savepng.cpp.orig	Fri Apr  8 16:11:45 2011
+++ src/IMG_savepng.cpp	Fri Aug 26 11:39:28 2011
@@ -27,6 +27,7 @@
 
 #ifdef IMPLEMENT_SAVE_PNG
 #include <png.h>
+#include <zlib.h>
 #endif
 
 #include <stdlib.h>
@@ -135,7 +136,7 @@ int IMG_SavePNG_RW(SDL_RWops *src, SDL_Surface *surf,i
 		goto savedone;
 	}
 	/* setup custom writer functions */
-	png_set_write_fn(png_ptr,(voidp)src,png_write_data,NULL);
+	png_set_write_fn(png_ptr,src,png_write_data,NULL);
 
 	if (setjmp(png_jmpbuf(png_ptr))){
 		SDL_SetError("Unknown error writing PNG");
