Index: runtime/src/kmp_wrapper_getpid.h =================================================================== --- runtime/src/kmp_wrapper_getpid.h +++ runtime/src/kmp_wrapper_getpid.h @@ -23,6 +23,9 @@ #if KMP_OS_DARWIN // OS X #define __kmp_gettid() syscall(SYS_thread_selfid) +#elif KMP_OS_FREEBSD +#include +#define __kmp_gettid() pthread_getthreadid_np() #elif KMP_OS_NETBSD #include #define __kmp_gettid() _lwp_self() Index: runtime/test/ompt/misc/interoperability.cpp =================================================================== --- runtime/test/ompt/misc/interoperability.cpp +++ runtime/test/ompt/misc/interoperability.cpp @@ -1,9 +1,9 @@ -// RUN: %libomp-cxx-compile-and-run | %sort-threads | FileCheck %s +// RUN: %libomp-cxx-compile -pthread && %libomp-run | %sort-threads | FileCheck %s // REQUIRES: ompt #include #include -#if !defined(__NetBSD__) +#if !defined(__FreeBSD__) && !defined(__NetBSD__) #include #else #include