We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1884

Summary: Fix png support for libpng 1.5.16
Product: SDL_image Reporter: Marcus von Appen <mva>
Component: miscAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2    
Version: unspecified   
Hardware: All   
OS: All   
Attachments: Patch for building png support with libpng 1.5.16

Description Marcus von Appen 2013-06-01 04:54:36 UTC
Created attachment 1165 [details]
Patch for building png support with libpng 1.5.16

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.

[...]
_SAFE -MT IMG_png.lo -MD -MP -MF .deps/IMG_png.Tpo -c ../IMG_png.c  -fPIC -DPIC -o .libs/IMG_png.o
../IMG_png.c:84: error: expected ')' before 'png_ptr'
../IMG_png.c:85: error: expected ';' before 'png_structp'
../IMG_png.c: In function 'IMG_InitPNG':
../IMG_png.c:115: error: 'struct <anonymous>' has no member named 'png_create_info_struct'
../IMG_png.c:116: error: expected declaration specifiers or '...' before 'png_const_structrp'
../IMG_png.c:118: error: 'struct <anonymous>' has no member named 'png_create_info_struct'
../IMG_png.c:122: error: 'struct <anonymous>' has no member named 'png_create_read_struct'
[...]

A patch is attached.
Comment 1 Sam Lantinga 2013-06-01 16:09:33 UTC
Fixed, thanks!
http://hg.libsdl.org/SDL_image/rev/777206f89dd2