After upgrade to libpng-1.6.1, compiling apngasm-2.7 triggers severe warnings: ---- apngasm.c: In function ‘LoadPNG’: apngasm.c:141:11: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default] memcpy(pInfo->pl, palette, pInfo->ps * 3); ^ apngasm.c: In function ‘LoadTGA’: apngasm.c:345:19: warning: incompatible implicit declaration of built-in function ‘memset’ [enabled by default] memset(row_ptr+i, col[0], n); ^ apngasm.c: In function ‘get_rect’: apngasm.c:554:7: warning: incompatible implicit declaration of built-in function ‘memcpy’ [enabled by default] memcpy(pc, &c2, 3); ^ # And a lot of similar warnings... ---- This sounds like a very bad thing. Compiler frequently can't pass parameters correctly if the function prototype is missing, right? Apparently it's caused by the removal of "#include <string.h>" within "png.h" in libpng-1.6. Adding "#include <string.h>" to apngasm.c fixes the issue here: ---- sed -i 's/#include "png.h"/#include <string.h>\n\0/' "${S}/apngasm.c" || die ---- Within my brief test patched apngasm-2.7 is working correctly. In theory this should go to upstream, but I doubt if the upstream of apngasm is still alive... Anyway, I did report this to upstream < https://sourceforge.net/projects/apngasm/forums/forum/1151026/topic/7544333 >. Reproducible: Always
thanks for the fix. in portage for 2.7