diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vmime/platforms/posix/posixHandler.cpp | 7 | ||||
-rw-r--r-- | src/vmime/propertySet.hpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/vmime/platforms/posix/posixHandler.cpp b/src/vmime/platforms/posix/posixHandler.cpp index 148d2169..8becf6ad 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_THR_SELF +# include <sys/thr.h> +#endif #if VMIME_HAVE_LWP_SELF # include <sys/lwp.h> #endif @@ -230,6 +233,10 @@ 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_THR_SELF // FreeBSD + long id = 0; + ::thr_self(&id); + return static_cast <unsigned int>(id); #elif VMIME_HAVE_LWP_SELF // Solaris return static_cast <unsigned int>(::_lwp_self()); #else diff --git a/src/vmime/propertySet.hpp b/src/vmime/propertySet.hpp index 681097d9..7ea31d5e 100644 --- a/src/vmime/propertySet.hpp +++ b/src/vmime/propertySet.hpp @@ -336,7 +336,7 @@ private: void parse(const string& props); - class propFinder : public std::unary_function <shared_ptr <property>, bool> { + class propFinder { public: |