From e81f16bf5d80066880b81b92ea6302bba4cda961 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Tue, 12 Apr 2016 21:17:22 -0700 Subject: [PATCH] timepng: more support requirements Signed-off-by: John Bowler --- contrib/libtests/timepng.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/libtests/timepng.c b/contrib/libtests/timepng.c index a17b6f613..a5779a903 100644 --- a/contrib/libtests/timepng.c +++ b/contrib/libtests/timepng.c @@ -36,7 +36,8 @@ # include "../../png.h" #endif -#if (((defined(PNG_READ_SUPPORTED)) && defined(PNG_STDIO_SUPPORTED))) +#if ((defined(PNG_SEQUENTIAL_READ_SUPPORTED)) && defined(PNG_STDIO_SUPPORTED)\ + && defined(PNG_EASY_ACCESS_SUPPORTED) && defined(PNG_INFO_IMAGE_SUPPORTED)) typedef struct { FILE *input; @@ -138,7 +139,9 @@ static int read_png(FILE *fp, png_int_32 transforms, FILE *write_file) return 0; } - png_set_benign_errors(png_ptr, 1/*allowed*/); +# ifdef PNG_BENIGN_ERRORS_SUPPORTED + png_set_benign_errors(png_ptr, 1/*allowed*/); +# endif png_init_io(png_ptr, fp); info_ptr = png_create_info_struct(png_ptr); @@ -528,6 +531,6 @@ int main(int argc, char **argv) /* Exit code 0 on success. */ return ok == 0; } -#else /* !READ || !STDIO */ +#else /* !sufficient support */ int main(void) { return 77; } -#endif /* !READ || !STDIO */ +#endif /* !sufficient support */