From 5b5fbe9aad551c994eef0664a2adee0f82e5aeb7 Mon Sep 17 00:00:00 2001
From: Alam Ed Arias <alam@srb2.org>
Date: Mon, 21 Apr 2014 23:07:02 -0400
Subject: [PATCH] fix suport for libpng 1.6

---
 src/m_misc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/m_misc.c b/src/m_misc.c
index acf6a5982d..bb0bb04600 100644
--- a/src/m_misc.c
+++ b/src/m_misc.c
@@ -77,6 +77,7 @@
 #define _FILE_OFFSET_BITS 0
 #endif
 
+ #include "zlib.h"
  #include "png.h"
  #if (PNG_LIBPNG_VER_MAJOR > 1) || (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 4)
   #define NO_PNG_DEBUG // 1.4.0 move png_debug to pngpriv.h
@@ -688,7 +689,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
 	else
 		snprintf(locationtxt, 40, "Unknown");
 
-	png_memset(png_infotext,0x00,sizeof (png_infotext));
+	memset(png_infotext,0x00,sizeof (png_infotext));
 
 	for (i = 0; i < SRB2PNGTXT; i++)
 		png_infotext[i].key  = keytxt[i];
-- 
GitLab