--- third_party/angle/src/common/system_utils_linux.cpp.orig 2026-09-25 15:26:43 UTC +++ third_party/angle/src/common/system_utils_linux.cpp @@ -16,10 +16,19 @@ #include #include +#if ANGLE_PLATFORM_OPENBSD +#include +#endif + +#ifndef CLOCK_MONOTONIC_RAW +#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC +#endif + #include namespace angle { +#if ANGLE_PLATFORM_LINUX std::string GetExecutablePath() { // We cannot use lstat to get the size of /proc/self/exe as it always returns 0 @@ -35,6 +44,7 @@ std::string GetExecutablePath() ANGLE_UNSAFE_TODO(path[result]) = '\0'; return path; } +#endif std::string GetExecutableDirectory() { @@ -67,6 +77,10 @@ void SetCurrentThreadName(const char *name) // There's a 15-character (16 including '\0') limit. If the name is too big (and ERANGE is // returned), name will be ignored. ASSERT(strlen(name) < 16); +#if ANGLE_PLATFORM_OPENBSD + pthread_set_name_np(pthread_self(), name); +#else pthread_setname_np(pthread_self(), name); +#endif } } // namespace angle