summaryrefslogtreecommitdiff
path: root/lib/libc_r/TEST/test.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/TEST/test.h')
-rw-r--r--lib/libc_r/TEST/test.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libc_r/TEST/test.h b/lib/libc_r/TEST/test.h
index f945092fe66..990526fb98c 100644
--- a/lib/libc_r/TEST/test.h
+++ b/lib/libc_r/TEST/test.h
@@ -17,6 +17,14 @@ static __dead void __vpanic __P((const char *, const char *, const char *,
static __dead void __panic __P((const char *, const char *, const char *,
int, const char *, ...)) __attribute__((noreturn));
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#include <pthread.h>
+#include <pthread_np.h>
+#define SET_NAME(x) pthread_set_name_np(pthread_self(), x)
+#else
+#define SET_NAME(x) /* nada */
+#endif
+
static void
__vpanic(type, errstr, filenm, lineno, fmt, ap)
const char *type;