From 875d378d39f1fc5f50cdec1bd338dc1a3da0a24b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 12 Apr 2022 14:34:59 +0000 Subject: Adapt tclZipfs.c to zlib 1.2.12 (due to the changes in crc32 handling) --- generic/tclZipfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index afd3db5..c936a15 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -27,7 +27,6 @@ #define MAP_FILE 0 #endif /* !MAP_FILE */ #define NOBYFOUR -#define crc32tab crc_table[0] #ifndef TBLS #define TBLS 1 #endif @@ -75,6 +74,8 @@ #include "zutil.h" #include "crc32.h" +static const z_crc_t* crc32tab; + /* ** We are compiling as part of the core. ** TIP430 style zipfs prefix @@ -1864,6 +1865,7 @@ ZipfsSetup(void) Tcl_MutexUnlock(&ZipFSMutex); #endif /* TCL_THREADS */ + crc32tab = get_crc_table(); Tcl_FSRegister(NULL, &zipfsFilesystem); Tcl_InitHashTable(&ZipFS.fileHash, TCL_STRING_KEYS); Tcl_InitHashTable(&ZipFS.zipHash, TCL_STRING_KEYS); -- cgit v0.12