From 033a0d7b499f8a4d07fc91880131d350eb7d6ba5 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Mon, 18 Jan 2016 00:40:46 -0800 Subject: [PATCH] pngunknown: fix NO_STDIO build pngunknown.c calls png_init_io (always), skip the test if there is no stdio.h support. Signed-off-by: John Bowler --- contrib/libtests/pngunknown.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/libtests/pngunknown.c b/contrib/libtests/pngunknown.c index 9355758a7..ecf8f33bb 100644 --- a/contrib/libtests/pngunknown.c +++ b/contrib/libtests/pngunknown.c @@ -34,6 +34,7 @@ * these must be defined: */ #if defined(PNG_SET_UNKNOWN_CHUNKS_SUPPORTED) &&\ + defined(PNG_STDIO_SUPPORTED) &&\ defined(PNG_READ_SUPPORTED) /* One of these must be defined to allow us to find out what happened. It is @@ -615,7 +616,7 @@ get_unknown(display *d, png_infop info_ptr, int after_IDAT) return flags; } -#else +#else /* SAVE_UNKNOWN_CHUNKS */ static png_uint_32 get_unknown(display *d, png_infop info_ptr, int after_IDAT) /* Otherwise this will return the cached values set by any user callback */ @@ -634,8 +635,8 @@ get_unknown(display *d, png_infop info_ptr, int after_IDAT) * a check to ensure the logic is correct. */ # error No store support and no user chunk support, this will not work -# endif -#endif +# endif /* READ_USER_CHUNKS */ +#endif /* SAVE_UNKNOWN_CHUNKS */ static int check(FILE *fp, int argc, const char **argv, png_uint_32p flags/*out*/,