Skip to content

Commit

Permalink
Fixed bug 1884 - Fix png support for libpng 1.5.16
Browse files Browse the repository at this point in the history
Marcus von Appen

Building the current hg version of SDL_image fails for libpng 1.5.16 since rev 4c41cee3e961 as png_struct_rp is not defined for that version of libpng. Other minor releases of libpng15 might be affected as well.
  • Loading branch information
slouken committed Jun 1, 2013
1 parent 4f6843a commit 817b502
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions IMG_png.c
Expand Up @@ -71,11 +71,15 @@
#include <png.h>

/* Check for the older version of libpng */
#if (PNG_LIBPNG_VER_MAJOR == 1) && (PNG_LIBPNG_VER_MINOR < 4)
#if (PNG_LIBPNG_VER_MAJOR == 1)
#if (PNG_LIBPNG_VER_MINOR < 4)
#define LIBPNG_VERSION_12
typedef png_bytep png_const_bytep;
#endif
#if (PNG_LIBPNG_VER_MINOR < 6)
typedef png_structp png_const_structrp;
typedef png_infop png_const_inforp;
typedef png_bytep png_const_bytep;
#endif
#endif

static struct {
Expand Down

0 comments on commit 817b502

Please sign in to comment.