diff --git a/contrib/libtests/pngvalid.c b/contrib/libtests/pngvalid.c index a32b21f2c..c82c269fd 100644 --- a/contrib/libtests/pngvalid.c +++ b/contrib/libtests/pngvalid.c @@ -62,10 +62,10 @@ /* 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 -# define SKIP 0 -#else +#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H) # define SKIP 77 +#else +# define SKIP 0 #endif /* pngvalid requires write support and one of the fixed or floating point APIs.