git: 8b6f11e5cbd6 - main - devel/zziplib: Fix build with Clang 16

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Wed, 06 Sep 2023 20:54:10 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8b6f11e5cbd6261a380d4ae0d2a7f0840ce669cf

commit 8b6f11e5cbd6261a380d4ae0d2a7f0840ce669cf
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-06 20:50:51 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-06 20:50:51 +0000

    devel/zziplib: Fix build with Clang 16
    
    PR:             273410
    Reported by:    Maigurs Stalidzans <neimsaci@gmx.com>
    Tested on:      14.0-ALPHA4 (amd64 and i386)
---
 devel/zziplib/files/patch-clang16 | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/devel/zziplib/files/patch-clang16 b/devel/zziplib/files/patch-clang16
new file mode 100644
index 000000000000..3168c243c061
--- /dev/null
+++ b/devel/zziplib/files/patch-clang16
@@ -0,0 +1,23 @@
+--- SDL/SDL_rwops_zzip.c.orig	2021-01-04 23:05:08 UTC
++++ SDL/SDL_rwops_zzip.c
+@@ -15,17 +15,17 @@
+ #define SDL_RWOPS_ZZIP_FILE(_context)  (ZZIP_FILE*) \
+              ((_context)->hidden.unknown.data1)
+ 
+-static int _zzip_seek(SDL_RWops *context, int offset, int whence)
++static Sint64 _zzip_seek(SDL_RWops *context, Sint64 offset, int whence)
+ {
+     return zzip_seek(SDL_RWOPS_ZZIP_FILE(context), offset, whence);
+ }
+ 
+-static int _zzip_read(SDL_RWops *context, void *ptr, int size, int maxnum)
++static size_t _zzip_read(SDL_RWops *context, void *ptr, size_t size, size_t maxnum)
+ {
+     return zzip_read(SDL_RWOPS_ZZIP_FILE(context), ptr, size*maxnum) / size;
+ }
+ 
+-static int _zzip_write(SDL_RWops *context, const void *ptr, int size, int num)
++static size_t _zzip_write(SDL_RWops *context, const void *ptr, size_t size, size_t num)
+ {
+     return 0; /* ignored */
+ }