From a74a8c48b252390ff79fc8c452ded6283a8eebac Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 6 Aug 2026 16:57:32 +0200 Subject: [PATCH] fix compile for android bionic c lib --- src/sdl/i_system.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 192b5e7c9..a48c53609 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -1411,7 +1411,11 @@ void I_SleepDuration(precise_t duration) duration -= slack; struct timespec ts = { .tv_sec = static_cast<__time_t>(duration / precision), +#ifdef __BIONIC__ + .tv_nsec = static_cast(duration * 1000000000 / precision % 1000000000), +#else .tv_nsec = static_cast<__syscall_slong_t>(duration * 1000000000 / precision % 1000000000), +#endif }; int status; do status = clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts);