File: 0001-Reintroduce-dummy-zip_archive_set_tempdir-function-t.patch

package info (click to toggle)
libzip 1.5.1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,168 kB
  • sloc: ansic: 13,166; perl: 1,056; sh: 133; makefile: 10
file content (56 lines) | stat: -rw-r--r-- 2,039 bytes parent folder | download
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
46
47
48
49
50
51
52
53
54
55
56
From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej@debian.org>
Date: Mon, 21 Jan 2019 11:13:43 +0000
Subject: Reintroduce dummy zip_archive_set_tempdir function to lower the
 SONAME back to libzip.so.4

---
 lib/CMakeLists.txt | 2 +-
 lib/zip.h          | 1 +
 lib/zip_open.c     | 9 +++++++++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index 92c4bec..ecec75a 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -210,7 +210,7 @@ IF(HAVE_CRYPTO)
 ENDIF()
 
 ADD_LIBRARY(zip ${LIBZIP_SOURCES} ${LIBZIP_EXTRA_FILES} ${LIBZIP_OPTIONAL_FILES} ${LIBZIP_OPSYS_FILES})
-SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 5.0 SOVERSION 5)
+SET_TARGET_PROPERTIES(zip PROPERTIES VERSION 4.0 SOVERSION 4)
 TARGET_LINK_LIBRARIES(zip ${ZLIB_LIBRARY} ${OPTIONAL_LIBRARY})
 INSTALL(TARGETS zip
   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
diff --git a/lib/zip.h b/lib/zip.h
index 2d83a99..e97995a 100644
--- a/lib/zip.h
+++ b/lib/zip.h
@@ -337,6 +337,7 @@ ZIP_EXTERN int zip_error_get_sys_type(int);
 ZIP_EXTERN void zip_error_get(zip_t *, int *, int *);                           /* use zip_get_error, zip_error_code_zip / zip_error_code_system */
 ZIP_EXTERN int zip_error_to_str(char *, zip_uint64_t, int, int);                /* use zip_error_init_with_code / zip_error_strerror */
 ZIP_EXTERN void zip_file_error_get(zip_file_t *, int *, int *);                 /* use zip_file_get_error, zip_error_code_zip / zip_error_code_system */
+ZIP_EXTERN int zip_archive_set_tempdir(zip_t *, const char *);
 #endif
 
 ZIP_EXTERN int zip_close(zip_t *);
diff --git a/lib/zip_open.c b/lib/zip_open.c
index 1886c9d..34e9ac3 100644
--- a/lib/zip_open.c
+++ b/lib/zip_open.c
@@ -155,6 +155,15 @@ zip_open_from_source(zip_source_t *src, int _flags, zip_error_t *error) {
     }
 }
 
+ZIP_EXTERN int
+zip_archive_set_tempdir(zip_t *za, const char *tempdir)
+{
+    (void)(za);
+    (void)(tempdir);
+
+    return 0;
+}
+
 
 zip_t *
 _zip_open(zip_source_t *src, unsigned int flags, zip_error_t *error) {