Fixed #177: thread id on OpenBSD.
This commit is contained in:
parent
f61efd2f36
commit
243efb267f
@ -939,6 +939,7 @@ CHECK_FUNCTION_EXISTS(getnameinfo VMIME_HAVE_GETNAMEINFO)
|
||||
CHECK_FUNCTION_EXISTS(gettid VMIME_HAVE_GETTID)
|
||||
CHECK_FUNCTION_EXISTS(syscall VMIME_HAVE_SYSCALL)
|
||||
CHECK_SYMBOL_EXISTS(SYS_gettid sys/syscall.h VMIME_HAVE_SYSCALL_GETTID)
|
||||
CHECK_SYMBOL_EXISTS(getthrid unistd.h VMIME_HAVE_GETTHRID)
|
||||
|
||||
CHECK_SYMBOL_EXISTS(SO_KEEPALIVE sys/socket.h VMIME_HAVE_SO_KEEPALIVE)
|
||||
CHECK_SYMBOL_EXISTS(SO_NOSIGPIPE sys/socket.h VMIME_HAVE_SO_NOSIGPIPE)
|
||||
|
@ -76,6 +76,7 @@ typedef unsigned @VMIME_64BIT_TYPE@ vmime_uint64;
|
||||
#cmakedefine01 VMIME_HAVE_GETTID
|
||||
#cmakedefine01 VMIME_HAVE_SYSCALL
|
||||
#cmakedefine01 VMIME_HAVE_SYSCALL_GETTID
|
||||
#cmakedefine01 VMIME_HAVE_GETTHRID
|
||||
#cmakedefine01 VMIME_HAVE_GMTIME_S
|
||||
#cmakedefine01 VMIME_HAVE_GMTIME_R
|
||||
#cmakedefine01 VMIME_HAVE_LOCALTIME_S
|
||||
|
@ -260,6 +260,8 @@ unsigned int posixHandler::getThreadId() const
|
||||
return static_cast <unsigned int>(::gettid());
|
||||
#elif VMIME_HAVE_SYSCALL && VMIME_HAVE_SYSCALL_GETTID
|
||||
return static_cast <unsigned int>(::syscall(SYS_gettid));
|
||||
#elif VMIME_HAVE_GETTHRID // OpenBSD
|
||||
return static_cast <unsigned int>(::getthrid());
|
||||
#else
|
||||
#error We have no implementation of getThreadId() for this platform!
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user