undef jmpbuf to make compile work on AIX 5.1
[rrdtool.git] / src / pngsize.c
index ed3666a..5aa3540 100644 (file)
@@ -22,6 +22,13 @@ PngSize(FILE *fd, long *width, long *height)
   (*width)=0;
   (*height)=0;
 
+/* this is to make compile on aix work since they seem to define jmpbuf
+   to be _jmpbuf which breaks compilation */
+
+#ifdef jmpbuf
+#undef jmpbuf
+#endif
+
   if (setjmp(png_read_ptr->jmpbuf)){
     png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL);
     return 0;