Compile and linker fixes for OpenBSD
* link with wxneeded required for DYNAREC, in addition to being installed onto a filesystem with the wxallowed flag (like /usr/local on a default installation) * pthread_setname_np is pthread_set_name_np on OpenBSD
This commit is contained in:
@@ -54,6 +54,10 @@
|
||||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_OPENBSD
|
||||
# include <pthread_np.h>
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static QByteArray buf;
|
||||
#endif
|
||||
@@ -804,8 +808,10 @@ plat_set_thread_name(void *thread, const char *name)
|
||||
char truncated[16];
|
||||
# endif
|
||||
strncpy(truncated, name, sizeof(truncated) - 1);
|
||||
# ifdef Q_OS_DARWIN
|
||||
# if defined(Q_OS_DARWIN)
|
||||
pthread_setname_np(truncated);
|
||||
# elif defined(Q_OS_OPENBSD)
|
||||
pthread_set_name_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
|
||||
# else
|
||||
pthread_setname_np(thread ? *((pthread_t *) thread) : pthread_self(), truncated);
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user