--- src/google/protobuf/map.h 2024-08-29 00:12:09.000000000 +0800 +++ src/google/protobuf/map.h 2024-09-01 16:22:53.000000000 +0800 @@ -26,7 +26,7 @@ #include #if !defined(GOOGLE_PROTOBUF_NO_RDTSC) && defined(__APPLE__) -#include +#include #endif #include "google/protobuf/stubs/common.h" @@ -709,7 +709,7 @@ #if defined(__APPLE__) // Use a commpage-based fast time function on Apple environments (MacOS, // iOS, tvOS, watchOS, etc). - s = clock_gettime_nsec_np(CLOCK_UPTIME_RAW); + s = mach_absolute_time(); #elif defined(__x86_64__) && defined(__GNUC__) uint32_t hi, lo; asm volatile("rdtsc" : "=a"(lo), "=d"(hi));