Commit 75f2e87b authored by pali.gabor@gmail.com's avatar pali.gabor@gmail.com
Browse files

Fix build with FreeBSD versions earlier than 9.0

parent cc1cc09d
......@@ -31,6 +31,9 @@
#if defined(HAVE_PTHREAD_H)
#include <pthread.h>
#if defined(freebsd_HOST_OS)
#include <pthread_np.h>
#endif
#endif
#if defined(THREADED_RTS)
......@@ -330,7 +333,8 @@ KernelThreadId kernelThreadId (void)
pid_t tid = syscall(SYS_gettid); // no really, see man gettid
return (KernelThreadId) tid;
#elif defined(freebsd_HOST_OS)
/* FreeBSD 9.0+ */
#elif defined(freebsd_HOST_OS) && (__FreeBSD_version >= 900031)
return pthread_getthreadid_np();
#elif defined(darwin_HOST_OS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment