From 15e133c89decc5178e1553936960fa3eb8320bddac18d77a46a354922f24cab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Mon, 2 Jan 2017 19:04:48 +0000 Subject: [PATCH] Accepting request 448535 from home:pluskalm OBS-URL: https://build.opensuse.org/request/show/448535 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/zlib?expand=0&rev=38 --- zlib-format.patch | 20 ++++++++++++++++++++ zlib.changes | 1 - zlib.spec | 3 +++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 zlib-format.patch diff --git a/zlib-format.patch b/zlib-format.patch new file mode 100644 index 0000000..5feca5d --- /dev/null +++ b/zlib-format.patch @@ -0,0 +1,20 @@ +From: meissner@suse.de +Subject: supply format arguments to gzprintf(). + +Index: zlib.h +=================================================================== +--- zlib.h.orig ++++ zlib.h +@@ -1463,7 +1463,11 @@ ZEXTERN z_size_t ZEXPORT gzfwrite OF((vo + is returned, and the error state is set to Z_STREAM_ERROR. + */ + +-ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)); ++ZEXTERN int ZEXPORTVA gzprintf Z_ARG((gzFile file, const char *format, ...)) ++#ifdef __GNUC__ ++ __attribute__((__format__(__printf__,2,3))) ++#endif ++; + /* + Converts, formats, and writes the arguments to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of diff --git a/zlib.changes b/zlib.changes index bf4d837..a65741e 100644 --- a/zlib.changes +++ b/zlib.changes @@ -17,7 +17,6 @@ Mon Jan 2 09:08:50 UTC 2017 - mpluskal@suse.com * zlib-bnc1003579.patch * zlib-bnc1003580.patch * zlib-bnc1013882.patch - * zlib-format.patch - Drop zlib-1.2.7-improve-longest_match-performance.patch * not accepted by upstream for two releases * rebasing no longer possible diff --git a/zlib.spec b/zlib.spec index 4550fc8..8a359ac 100644 --- a/zlib.spec +++ b/zlib.spec @@ -28,6 +28,8 @@ Source0: http://zlib.net/zlib-%{version}.tar.gz Source1: LICENSE Source2: baselibs.conf Source3: zlib-rpmlintrc +#PATCH-FIX-SUSE: compiler check of varguments passed to gzprintf +Patch1: zlib-format.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool @@ -109,6 +111,7 @@ developing applications which use minizip. %prep %setup -q +%patch1 %build export LDFLAGS="-Wl,-z,relro,-z,now"