| Summary: | png_const_bytep should not be used in libpng >= 14 | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | driedfruit <driedfruit> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | maarten |
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: |
patch to fix the issue
Patch to provide png_const_bytep for libpng < 1.6 |
||
Created attachment 1731 [details]
Patch to provide png_const_bytep for libpng < 1.6
I encountered the same issue compiling SDL2_image-2.0.0 against libpng 1.4.13. I have an even smaller patch to solve the issue, see attachment.
Fixed, thanks! https://hg.libsdl.org/SDL_image/rev/43873c313f32 |
Created attachment 1191 [details] patch to fix the issue The ifdef/typedef define the "png_bytep" type, for libpng12, but there are 2 instances in the code, when raw "png_const_bytep" is still used. This breaks libpng14 compile. libtool: compile: gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DPACKAGE=\"SDL2_image\" -DVERSION=\"2.0.0\" -DLOAD_PNG=1 -DLOAD_PNG_DYNAMIC=\"libpng14.so.14\" -I. -I/usr/include/libpng14 -g -O2 -I/usr/local/include/SDL2 -D_REENTRANT -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:102: error: expected ‘)’ before ‘sig’ IMG_png.c:104: error: expected ‘;’ before ‘jmp_buf’