ports/devel/abseil-cpp/patches/patch-absl_base_internal_sysinfo_cc

19 lines
387 B
Text
Raw Normal View History

2023-08-21 05:20:32 +00:00
Use getthrid(2) as GetTID() implementation.
Index: absl/base/internal/sysinfo.cc
--- absl/base/internal/sysinfo.cc.orig
+++ absl/base/internal/sysinfo.cc
@@ -441,6 +441,12 @@ pid_t GetTID() {
return reinterpret_cast<pid_t>(thread);
}
+#elif defined(__OpenBSD__)
+
+pid_t GetTID() {
+ return getthrid();
+}
+
#else
// Fallback implementation of `GetTID` using `pthread_self`.