Skip to content

Commit 04728aa

Browse files
committed
fix(miniz): Patch for API<24
See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md ftello and fseeko are not available below api24
1 parent 2387b84 commit 04728aa

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • modules/lwjgl/core/src/main/c/dependencies/miniz

modules/lwjgl/core/src/main/c/dependencies/miniz/miniz.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3226,6 +3226,15 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
32263226
#endif /* #ifdef _MSC_VER */
32273227
#endif /* #ifdef MINIZ_NO_STDIO */
32283228

3229+
// See https://android.googlesource.com/platform/bionic/+/main/docs/32-bit-abi.md
3230+
#if defined(__ANDROID__) && __ANDROID_API__ < 24
3231+
#define MZ_FTELL64 ftell
3232+
#define MZ_FSEEK64 fseek
3233+
#else
3234+
#define MZ_FTELL64 ftello
3235+
#define MZ_FSEEK64 fseeko
3236+
#endif
3237+
32293238
#define MZ_TOLOWER(c) ((((c) >= 'A') && ((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
32303239

32313240
/* Various ZIP archive enums. To completely avoid cross platform compiler alignment and platform endian issues, miniz.c doesn't use structs for any of this stuff. */

0 commit comments

Comments
 (0)