build: don't fseeko64()/ftello64() on musl libc

Check for musl libc in Patch.cpp and use fseeko()/ftello() in that case
instead of fseeko64()/ftello64() as well, as the 64 variants are glibc
extensions.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2023-12-23 10:23:25 +00:00
parent 3c5348983b
commit a045270164
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 11 additions and 1 deletions

View File

@ -15,8 +15,18 @@
#ifndef __LIBRETRO__
#ifdef __linux__
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <features.h>
#ifndef __USE_GNU
#define __MUSL__
#endif
#endif
#ifdef __GNUC__
#if defined(__APPLE__) || defined(BSD) || defined(__NetBSD__)
#if defined(__MUSL__) || defined(__APPLE__) || defined(BSD) || defined(__NetBSD__)
typedef off_t __off64_t; /* off_t is 64 bits on BSD. */
#define fseeko64 fseeko
#define ftello64 ftello