blob: b313113f4c639014575a3ff5bb59eedb7b901168 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
--- third_party/angle/src/common/system_utils_linux.cpp.orig 2024-02-03 15:42:55 UTC
+++ third_party/angle/src/common/system_utils_linux.cpp
@@ -15,8 +15,13 @@
#include <array>
+#if ANGLE_PLATFORM_OPENBSD
+#include <pthread_np.h>
+#endif
+
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
@@ -32,6 +37,7 @@ std::string GetExecutablePath()
path[result] = '\0';
return path;
}
+#endif
std::string GetExecutableDirectory()
{
@@ -56,6 +62,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), just ignore the name.
+#if ANGLE_PLATFORM_OPENBSD
+ pthread_set_name_np(pthread_self(), name);
+#else
pthread_setname_np(pthread_self(), name);
+#endif
}
} // namespace angle
|