mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix compilation on musl (#8067)
This commit is contained in:
committed by
Michał Janiszewski
parent
1e9cda8d2b
commit
8e6eb08275
@@ -79,11 +79,9 @@ using colour_t = uint8_t;
|
||||
|
||||
#endif // defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
||||
|
||||
#if !( \
|
||||
(defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) \
|
||||
|| (defined(__APPLE__) && defined(__MACH__)) || defined(__ANDROID_API__) || defined(__FreeBSD__))
|
||||
#ifdef _WIN32
|
||||
char* strndup(const char* src, size_t size);
|
||||
#endif // !(POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700)
|
||||
#endif
|
||||
|
||||
// BSD and macOS have MAP_ANON instead of MAP_ANONYMOUS
|
||||
#ifndef MAP_ANONYMOUS
|
||||
|
||||
@@ -43,9 +43,7 @@
|
||||
static mach_timebase_info_data_t _mach_base_info = {};
|
||||
#endif
|
||||
|
||||
#if !( \
|
||||
(defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) \
|
||||
|| (defined(__APPLE__) && defined(__MACH__)))
|
||||
#ifdef _WIN32
|
||||
char* strndup(const char* src, size_t size)
|
||||
{
|
||||
size_t len = strnlen(src, size);
|
||||
@@ -60,13 +58,10 @@ char* strndup(const char* src, size_t size)
|
||||
dst[len] = '\0';
|
||||
return dst;
|
||||
}
|
||||
#endif // !((defined (_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200809L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 700) ||
|
||||
// (defined(__APPLE__) && defined(__MACH__)))
|
||||
|
||||
#ifdef _WIN32
|
||||
static uint32_t _frequency = 0;
|
||||
static LARGE_INTEGER _entryTimestamp;
|
||||
#endif
|
||||
#endif // _WIN32
|
||||
|
||||
using update_palette_func = void (*)(const uint8_t*, int32_t, int32_t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user