summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng/libpng-src/pngtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/libpng/libpng-src/pngtest.c')
-rw-r--r--Build/source/libs/libpng/libpng-src/pngtest.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/Build/source/libs/libpng/libpng-src/pngtest.c b/Build/source/libs/libpng/libpng-src/pngtest.c
index 57724e0651d..eb431f95c66 100644
--- a/Build/source/libs/libpng/libpng-src/pngtest.c
+++ b/Build/source/libs/libpng/libpng-src/pngtest.c
@@ -43,6 +43,15 @@
#include "png.h"
+/* 1.6.1 added support for the configure test harness, which uses 77 to indicate
+ * a skipped test, in earlier versions we need to succeed on a skipped test, so:
+ */
+#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H)
+# define SKIP 77
+#else
+# define SKIP 0
+#endif
+
/* Known chunks that exist in pngtest.png must be supported or pngtest will fail
* simply as a result of re-ordering them. This may be fixed in 1.7
*
@@ -2065,9 +2074,9 @@ main(void)
fprintf(STDERR,
" test ignored because libpng was not built with read support\n");
/* And skip this test */
- return PNG_LIBPNG_VER < 10600 ? 0 : 77;
+ return SKIP;
}
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef png_libpng_version_1_6_21 Your_png_h_is_not_version_1_6_21;
+typedef png_libpng_version_1_6_22 Your_png_h_is_not_version_1_6_22;