1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00

devel/zziplib: Fix build with Clang 16

PR:		273410
Reported by:	Maigurs Stalidzans <neimsaci@gmx.com>
Tested on:	14.0-ALPHA4 (amd64 and i386)
This commit is contained in:
Po-Chuan Hsieh 2023-09-07 04:50:51 +08:00
parent 7fd558244e
commit 8b6f11e5cb
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B

View File

@ -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 */
}