mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-23 18:49:37 -10:00
retro_sleep_until_us's generic loop calls retro_sleep_us, which is a per-platform macro from retro_timers.h on every console and on emscripten. rtime.c never included that header. Windows and Darwin compiled because they define the function in this file; 3DS, GameCube, Wii, WiiU, PSP, Vita, PS3 and emscripten all broke, as implicit declarations where the build allows them and link errors where it does not. One include fixes every one of them. The class this belongs to is the one the matrix exists to catch and did not: a shared file whose #if ladder has a branch only the console toolchains compile. Eight lanes now compile rtime.c under each platform's defines against hermetic stubs of the SDK headers retro_timers.h pulls (3ds.h, pspthreadman.h, wiiu/os/thread.h, sys/timer.h are new; the Vita stub gains the one call it names). A first draft of those lanes passed with the include removed: the host compiler predefines __linux__, so every lane took the Linux branch of the ladder and proved nothing. Console lanes now shed __linux__ and its aliases; with the include removed all eight fail with CI's exact error, and with it restored all eight pass. The lanes were proven against the bug before the fix was committed. Verified: the full 88-lane matrix, the linux build, and the retro_sleep_until sample green.
7 lines
185 B
C
7 lines
185 B
C
/* Hermetic stand-in for the PS3 SDK's <sys/timer.h>: what
|
|
* retro_timers.h names. */
|
|
#ifndef STUB_SYS_TIMER_H
|
|
#define STUB_SYS_TIMER_H
|
|
int sys_timer_usleep(unsigned int usec);
|
|
#endif
|