From 92a9ac43fc9e8bb7c0ba5c0fe5f1260c66ea6d6b Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sat, 9 Mar 2024 17:45:27 +0100 Subject: [PATCH] port: fix linux build --- port/src/system.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/port/src/system.c b/port/src/system.c index b3c9948cb..e889f75df 100644 --- a/port/src/system.c +++ b/port/src/system.c @@ -24,6 +24,10 @@ static CREATEWAITABLETIMEREXAFN pfnCreateWaitableTimerExA; #else +#ifndef _GNU_SOURCE +#define _GNU_SOURCE 1 +#endif + #include // figure out how to yield @@ -293,7 +297,7 @@ void sysSleep(const s64 hns) SetWaitableTimer(timer, &li, 0, NULL, NULL, FALSE); WaitForSingleObject(timer, INFINITE); #else - const timespec spec = { 0, hns * 100 }; + const struct timespec spec = { 0, hns * 100 }; nanosleep(&spec, NULL); #endif }