--- src/third_party/timelib/timelib.h.orig 2023-06-16 20:55:56.000000000 +0800 +++ src/third_party/timelib/timelib.h 2024-04-10 09:17:41.000000000 +0800 @@ -366,7 +366,7 @@ # define timelib_calloc calloc # define timelib_strdup strdup # define timelib_free free -# if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) +# if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) || defined(__APPLE__) # define TIMELIB_USE_BUILTIN_STRNDUP 1 # else # define TIMELIB_USE_BUILTIN_STRNDUP 0