19 lines
387 B
Text
19 lines
387 B
Text
|
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`.
|