[cairo] Bug compiling cairo in AIX

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 31 09:13:16 PDT 2007

Rajesh Narayanan (rajnaran_amb at hotmail.com) said: 
> Thanks for the response.  I did use #undef jmpbuf after png.h include and try to make again.
> I got the same error:
> cairo-png.c: In function `png_simple_error_callback':cairo-png.c:97: error: structure has no member named `jmpbuf'make[2]: *** [cairo-png.lo] Error 1make[2]: Leaving directory `/vignette_temp/Wireshark_src/Dependent/cairo-1.4.10/src'make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/vignette_temp/Wireshark_src/Dependent/cairo-1.4.10'make: *** [all] Error 2
> and this is the function code:
> static voidpng_simple_error_callback (png_structp png_save_ptr,                           png_const_charp error_msg){    _cairo_error (CAIRO_STATUS_NO_MEMORY);    longjmp (png_save_ptr->jmpbuf, CAIRO_STATUS_NO_MEMORY);}
> Regards,
> Raj

Taking it one step further... Reading libpng, it appears that should the
custom error handler return then libpng will call it's default error
handler which in this case would trigger an abort. So it seems safe to
just remove the usage of ->jmpbuf. Patch attached.

Hope this helps.
Chris Wilson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: png-nojmpbuf.diff
Type: text/x-diff
Size: 1296 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20071031/7663f07e/attachment.diff 

More information about the cairo mailing list