diff options
| author | Pierre Pronchery <khorben@defora.org> | 2021-03-12 08:28:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-11 23:28:50 -0800 |
| commit | 6cf241a8f80d9323b6ba22c17c54b3eb42ac1d7d (patch) | |
| tree | 6cdcf70bd39bbe183c7e5ec6a90a1ed556cc0eca | |
| parent | 9d6b24177e1dfdfe967337b708fde06abd629a12 (diff) | |
| download | nng-6cf241a8f80d9323b6ba22c17c54b3eb42ac1d7d.tar.gz nng-6cf241a8f80d9323b6ba22c17c54b3eb42ac1d7d.tar.bz2 nng-6cf241a8f80d9323b6ba22c17c54b3eb42ac1d7d.zip | |
Build fix for NetBSD (#1433)
| -rw-r--r-- | src/platform/posix/posix_thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/posix/posix_thread.c b/src/platform/posix/posix_thread.c index fe21c3b5..c200990b 100644 --- a/src/platform/posix/posix_thread.c +++ b/src/platform/posix/posix_thread.c @@ -262,6 +262,12 @@ nni_plat_thr_set_name(nni_plat_thr *thr, const char *name) if ((thr == NULL) || (pthread_self() == thr->tid)) { pthread_setname_np(name); } +#elif defined(__NetBSD__) + if (thr == NULL) { + pthread_setname_np(pthread_self(), "%s", name); + } else { + pthread_setname_np(thr->tid, "%s", name); + } #else if (thr == NULL) { pthread_setname_np(pthread_self(), name); |
