Browse Source

fix thread setname on NetBSD

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1626/head
R4SAS 4 years ago
parent
commit
5931cb59ab
  1. 4
      libi2pd/util.cpp

4
libi2pd/util.cpp

@ -119,10 +119,12 @@ namespace util @@ -119,10 +119,12 @@ namespace util
}
void SetThreadName (const char *name) {
#if defined (__APPLE__)
#if defined(__APPLE__)
pthread_setname_np(name);
#elif defined(__FreeBSD__) || defined(__OpenBSD__)
pthread_set_name_np(pthread_self(), name);
#elif defined(__NetBSD__)
pthread_setname_np(pthread_self(), "%s", (void *)name);
#else
pthread_setname_np(pthread_self(), name);
#endif

Loading…
Cancel
Save