From d62bcf14e69ddd4265774eb0a6667d42ec1fb40c Mon Sep 17 00:00:00 2001 From: maron2000 <68574602+maron2000@users.noreply.github.com> Date: Sat, 10 May 2025 12:50:56 +0900 Subject: [PATCH] Fix build error on Windows --- src/hardware/serialport/misc_util.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hardware/serialport/misc_util.cpp b/src/hardware/serialport/misc_util.cpp index 56c2fcce5..ebe6d0be8 100644 --- a/src/hardware/serialport/misc_util.cpp +++ b/src/hardware/serialport/misc_util.cpp @@ -33,15 +33,15 @@ #undef WITH_ENET_IMPLEMENTATION #endif +#if __APPLE__ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 #include - #define STR2(x) #x #define STR(x) STR2(x) +#pragma message("__MAC_OS_X_VERSION_MIN_REQUIRED = " STR(__MAC_OS_X_VERSION_MIN_REQUIRED)) -#if __APPLE__ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 #define CLOCK_REALTIME 0 #define CLOCK_MONOTONIC 1 -#pragma message("__MAC_OS_X_VERSION_MIN_REQUIRED = " STR(__MAC_OS_X_VERSION_MIN_REQUIRED)) + extern "C" { int clock_gettime(int X, struct timespec *tv); /* macOS 10.12+ has clock_gettime() */ }