aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Engelhardt <[email protected]>2023-11-09 19:32:47 +0000
committerGitHub <[email protected]>2023-11-09 19:32:47 +0000
commit1a35bb6d71b6301287e21aaabd112997ea0f0a7f (patch)
tree2c707feec48c68e26f0fc7b5b5d6de51eb5cb56a /src
parentUpdate cmake (#277) (diff)
downloadvmime-1a35bb6d71b6301287e21aaabd112997ea0f0a7f.tar.gz
vmime-1a35bb6d71b6301287e21aaabd112997ea0f0a7f.zip
Build: add Solaris compilation support (#282)
Diffstat (limited to 'src')
-rw-r--r--src/vmime/platforms/posix/posixHandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vmime/platforms/posix/posixHandler.cpp b/src/vmime/platforms/posix/posixHandler.cpp
index eecdbea9..148d2169 100644
--- a/src/vmime/platforms/posix/posixHandler.cpp
+++ b/src/vmime/platforms/posix/posixHandler.cpp
@@ -48,6 +48,9 @@
#if VMIME_HAVE_SYSCALL
# include <sys/syscall.h>
#endif
+#if VMIME_HAVE_LWP_SELF
+# include <sys/lwp.h>
+#endif
#include <netdb.h>
@@ -227,6 +230,8 @@ unsigned int posixHandler::getThreadId() const {
return static_cast <unsigned int>(::syscall(SYS_gettid));
#elif VMIME_HAVE_GETTHRID // OpenBSD
return static_cast <unsigned int>(::getthrid());
+#elif VMIME_HAVE_LWP_SELF // Solaris
+ return static_cast <unsigned int>(::_lwp_self());
#else
#error We have no implementation of getThreadId() for this platform!
#endif