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 2636 - Changeset 461 breaks build on Linux with libpng v1.5
Summary: Changeset 461 breaks build on Linux with libpng v1.5
Status: RESOLVED FIXED
Alias: None
Product: SDL_image
Classification: Unclassified
Component: misc (show other bugs)
Version: unspecified
Hardware: x86 Linux
: P2 blocker
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-10 17:35 UTC by Joe LeVeque
Modified: 2014-07-11 06:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe LeVeque 2014-07-10 17:35:23 UTC
It appears as though png_const_bytep is already defined in libpng v1.5, and thus this changeset creates a multiple define. To fix, png_const_bytep should only be defined for libpng < 1.5, as follows:

/* Check for the older version of libpng */
#if (PNG_LIBPNG_VER_MAJOR == 1)
#if (PNG_LIBPNG_VER_MINOR < 5)
#define LIBPNG_VERSION_12
#endif
#if (PNG_LIBPNG_VER_MINOR < 5)
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;
#endif
#endif
Comment 1 Sam Lantinga 2014-07-11 06:00:46 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL_image/rev/4078e65827ea