+2014-05-07 Paul Eggert <eggert@cs.ucla.edu>
+
+ * image.c: Include <png.h> before <setjmp.h> (Bug#17429).
+
2014-05-06 Paul Eggert <eggert@cs.ucla.edu>
* image.c: Do not use libpng if HAVE_NS, as NS does its own thing.
#include "sysstdio.h"
#include <unistd.h>
+/* Include this before including <setjmp.h> to work around bugs with
+ older libpng; see Bug#17429. */
+#if defined HAVE_PNG && !defined HAVE_NS
+# include <png.h>
+#endif
+
#include <setjmp.h>
#include <c-ctype.h>
#if defined HAVE_PNG && !defined HAVE_NS
-#include <png.h>
-
#ifdef WINDOWSNT
/* PNG library details. */