File: 0001-Restore-gzflags-symbol-for-ABI-compatibility.patch

package info (click to toggle)
zlib 1%3A1.2.11.dfsg-2
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, bullseye-backports, bullseye-proposed-updates, sid
  • size: 1,856 kB
  • sloc: ansic: 17,063; sh: 983; makefile: 575; pascal: 115; perl: 104; xml: 95
file content (45 lines) | stat: -rw-r--r-- 1,148 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From c4f216359258206fd2b997c5dda1f50892e30301 Mon Sep 17 00:00:00 2001
From: Mark Brown <broonie@sirena.org.uk>
Date: Thu, 3 May 2012 10:27:58 +0100
Subject: [PATCH] Restore gzflags symbol for ABI compatibility

zlib 1.2.7 no longer uses the gzflags symbol but since it was previously
an exported symbol we should really retain it in order to preserve
binary compatibility in case anything linked with it; nothing should
have been doing so but the cost of retaining the symbol is very low so
just do it.
---
 zlib.map |    1 +
 zutil.c  |    6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/zlib.map b/zlib.map
index 771f420..54fa553 100644
--- a/zlib.map
+++ b/zlib.map
@@ -73,6 +73,7 @@ ZLIB_1.2.5.1 {
 
 ZLIB_1.2.5.2 {
     deflateResetKeep;
+    gzflags;
     gzgetc_;
     inflateResetKeep;
 } ZLIB_1.2.5.1;
diff --git a/zutil.c b/zutil.c
index 65e0d3b..ddece96 100644
--- a/zutil.c
+++ b/zutil.c
@@ -321,4 +321,10 @@ void ZLIB_INTERNAL zcfree (opaque, ptr)
 
 #endif /* MY_ZCALLOC */
 
+/* Dummy function returned for ABI compatibility */
+unsigned long ZEXPORT gzflags (void)
+{
+    return 0;
+}
+
 #endif /* !Z_SOLO */
-- 
1.7.10