diff --git a/program/src/pngsize.c b/program/src/pngsize.c
index 6b8b264e7fe9594219407fc5672363c39b5655ce..057ce0933a5ccdf5f11b8aa069df531ead0f574b 100644 (file)
--- a/program/src/pngsize.c
+++ b/program/src/pngsize.c
/*****************************************************************************
- * RRDtool 1.2.26 Copyright by Tobi Oetiker, 1997-2007
+ * RRDtool 1.2.30 Copyright by Tobi Oetiker, 1997-2009
*****************************************************************************
* pngsize.c determine the size of a PNG image
*****************************************************************************/
/* this is to make compile on aix work since they seem to define jmpbuf
to be _jmpbuf which breaks compilation */
+
+#ifndef png_jmpbuf
+#ifdef PNG_SETJMP_SUPPORTED
+# define png_jmpbuf(png_ptr) ((png_ptr)->PNG_jmpbuf)
+#else
#ifdef jmpbuf
#undef jmpbuf
#endif
-
-#ifndef png_jmpbuf
# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
+#endif
#endif
if (setjmp(png_jmpbuf(png_read_ptr))){