From 75abeca4a9d606bee89a41475f2f451187fec127 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Sat, 4 Feb 2023 18:17:39 -0800 Subject: More compliance with C11. --- timer/include/timer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'timer/include/timer.h') diff --git a/timer/include/timer.h b/timer/include/timer.h index a8a3f8b..b65f8d4 100644 --- a/timer/include/timer.h +++ b/timer/include/timer.h @@ -6,6 +6,10 @@ #ifdef _WIN32 typedef uint64_t time_point; #else +// Need to macro to make CLOCK_REALTIME available when compiling with ISO C11. +// The constant is only needed in the source file, but the header file needs to +// include time.h too. +#define __USE_POSIX199309 #include typedef struct timespec time_point; #endif -- cgit v1.2.3