From 267a1183da8981b4119039aaf6d4b7d27fcc8ce2 Mon Sep 17 00:00:00 2001 From: oetiker Date: Thu, 15 Nov 2007 14:32:37 +0000 Subject: [PATCH] make sure this compiles with aix git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk@1224 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/pngsize.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/program/src/pngsize.c b/program/src/pngsize.c index 1705fc8c..59e2003f 100644 --- a/program/src/pngsize.c +++ b/program/src/pngsize.c @@ -31,10 +31,14 @@ int PngSize( #undef jmpbuf #endif - if (setjmp(png_read_ptr->jmpbuf)) { - png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp) NULL); - return 0; - } +#ifndef png_jmpbuf +# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) +#endif + + if (setjmp(png_jmpbuf(png_read_ptr))){ + png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL); + return 0; + } png_init_io(png_read_ptr, fd); png_read_info(png_read_ptr, info_ptr); -- 2.30.2