Commit the patch
This commit is contained in:
parent
f445a0a86a
commit
343a81007b
@ -0,0 +1,61 @@
|
||||
From 6b87c6e8f4c87652a73841fbc4259ff63c25b0f6 Mon Sep 17 00:00:00 2001
|
||||
From: Till Kamppeter <till.kamppeter@gmail.com>
|
||||
Date: Sun, 5 Feb 2023 13:59:14 +0100
|
||||
Subject: [PATCH] cfImageOpenFP(): Removed leftover HAVE_LIBZ conditionals
|
||||
|
||||
In an earlier commit we have removed the dependency on libz from the
|
||||
build system as there is no explicit dependency on it in
|
||||
libcupsfilters.
|
||||
|
||||
The conditionals for libpng availability (HAVE_LIBPNG) were combined
|
||||
with HAVE_LIBZ, probably due to internal use of libz by libpng. This
|
||||
is unnecessary and broke PNG image reading support since HAVE_LIBZ
|
||||
does not get defined any more by the build system.
|
||||
|
||||
So we have simply removed the HAVE_LIBZ conditionals now.
|
||||
---
|
||||
cupsfilters/image-png.c | 4 ++--
|
||||
cupsfilters/image.c | 4 ++--
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/cupsfilters/image-png.c b/cupsfilters/image-png.c
|
||||
index 60bd6a86..9690cdf5 100644
|
||||
--- a/cupsfilters/image-png.c
|
||||
+++ b/cupsfilters/image-png.c
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "image-private.h"
|
||||
|
||||
-#if defined(HAVE_LIBPNG) && defined(HAVE_LIBZ)
|
||||
+#ifdef HAVE_LIBPNG
|
||||
# include <png.h> // Portable Network Graphics (PNG) definitions
|
||||
|
||||
|
||||
@@ -315,4 +315,4 @@ _cfImageReadPNG(
|
||||
|
||||
return (0);
|
||||
}
|
||||
-#endif // HAVE_LIBPNG && HAVE_LIBZ
|
||||
+#endif // HAVE_LIBPNG
|
||||
diff --git a/cupsfilters/image.c b/cupsfilters/image.c
|
||||
index 76d1d8ca..cfd2095f 100644
|
||||
--- a/cupsfilters/image.c
|
||||
+++ b/cupsfilters/image.c
|
||||
@@ -382,12 +382,12 @@ cfImageOpenFP(
|
||||
img->xppi = 200;
|
||||
img->yppi = 200;
|
||||
|
||||
-#if defined(HAVE_LIBPNG) && defined(HAVE_LIBZ)
|
||||
+#ifdef HAVE_LIBPNG
|
||||
if (!memcmp(header, "\211PNG", 4))
|
||||
status = _cfImageReadPNG(img, fp, primary, secondary, saturation, hue,
|
||||
lut);
|
||||
else
|
||||
-#endif // HAVE_LIBPNG && HAVE_LIBZ
|
||||
+#endif // HAVE_LIBPNG
|
||||
#ifdef HAVE_LIBJPEG
|
||||
if (!memcmp(header, "\377\330\377", 3) && // Start-of-Image
|
||||
header[3] >= 0xe0 && header[3] <= 0xef) // APPn
|
||||
--
|
||||
2.39.1
|
||||
|
Loading…
Reference in New Issue
Block a user