From 958ffad706230329a252cdeaa931ea32842d9f5f Mon Sep 17 00:00:00 2001 From: Cameron Youell Date: Wed, 30 Aug 2023 16:50:28 +1000 Subject: [PATCH] AK: Provide more complete definitions for AK_OS_WINDOWS MSG_NOSIGNAL is a no-op for Windows, so we can define it to 0. At the same *time*, none of the CLOCK_* macros are defined on Windows, as clock_gettime does not exist. Put AK_OS_WINDOWS in the same category of the BSDs for the COARSE versions of those macros. Co-authored-by: Andrew Kaster --- AK/Platform.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AK/Platform.h b/AK/Platform.h index 879e75ef658..807f6f7038e 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -277,10 +277,10 @@ #endif #if defined(AK_OS_WINDOWS) -# define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC +# define MSG_NOSIGNAL 0 #endif -#if defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_FREEBSD) || defined(AK_OS_HAIKU) +#if defined(AK_OS_BSD_GENERIC) && !defined(AK_OS_FREEBSD) || defined(AK_OS_HAIKU) || defined(AK_OS_WINDOWS) # define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC # define CLOCK_REALTIME_COARSE CLOCK_REALTIME #endif