From 9b9843f698a1b111a14dcc9a66d2e5c57ae3eacc Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Tue, 29 Dec 2020 13:33:24 +0100 Subject: [PATCH] Exclude libpng load when building with libspng Similar to ce63fc1, but allowing libpng to be configured with -DPNG_NO_READ (i.e reading functionally disabled). --- libvips/foreign/vipspng.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libvips/foreign/vipspng.c b/libvips/foreign/vipspng.c index cad03afb..df3342fb 100644 --- a/libvips/foreign/vipspng.c +++ b/libvips/foreign/vipspng.c @@ -161,6 +161,8 @@ user_warning_function( png_structp png_ptr, png_const_charp warning_msg ) g_warning( "%s", warning_msg ); } +#ifndef HAVE_SPNG + #define INPUT_BUFFER_SIZE (4096) /* What we track during a PNG read. @@ -763,6 +765,8 @@ vips__png_isinterlaced_source( VipsSource *source ) return( interlace_type != PNG_INTERLACE_NONE ); } +#endif /*!defined(HAVE_SPNG)*/ + const char *vips__png_suffs[] = { ".png", NULL }; /* What we track during a PNG write.