https://github.com/termux/termux-packages/issues/15852
https://github.com/gdraheim/zziplib/issues/140
https://github.com/gdraheim/zziplib/pull/141

From 38e4d5f561318fa825e6544c2ef55ac5899c81b0 Mon Sep 17 00:00:00 2001
From: Nicholas Vinson <nvinson234@gmail.com>
Date: Tue, 20 Sep 2022 19:27:48 -0400
Subject: [PATCH] Fix incompatible pointer error

Fixes gdraheim/zziplib#140

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
---
 zzip/mmapped.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/zzip/mmapped.c b/zzip/mmapped.c
index 2071882..bca2c8d 100644
--- a/zzip/mmapped.c
+++ b/zzip/mmapped.c
@@ -661,7 +661,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry)
 
     ___ /* a ZIP64 extended block may follow. */
     size_t csize = zzip_file_header_csize(header);
-    off_t offset = zzip_file_header_to_data(header);
+    size_t offset = zzip_file_header_sizeto_end(header);
     if (csize == 0xFFFFu) {
         struct zzip_extra_zip64* zip64 =
            zzip_file_header_to_extras(header);
@@ -682,7 +682,7 @@ zzip_disk_entry_fopen(ZZIP_DISK * disk, ZZIP_DISK_ENTRY * entry)
     file->zlib.zalloc = Z_NULL;
     file->zlib.zfree = Z_NULL;
     file->zlib.avail_in = csize;
-    file->zlib.next_in = offset;
+    file->zlib.next_in = (Bytef *)header + offset;
     ____;
 
     DBG2("compressed size %i", (int) file->zlib.avail_in);
