]> granicus.if.org Git - llvm/commitdiff
Add missing #includes for FreeBSD.
authorZachary Turner <zturner@google.com>
Fri, 3 Mar 2017 18:38:22 +0000 (18:38 +0000)
committerZachary Turner <zturner@google.com>
Fri, 3 Mar 2017 18:38:22 +0000 (18:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296902 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Unix/Threading.inc

index 06f4a2da6e7c6f4bd3087481f3cd484dc06921eb..2bcf8e5cd5f96144ac55b1b6eca0e1456034387e 100644 (file)
 #include <pthread.h>
 
 #if defined(__FreeBSD__)
-#include <pthread_np.h>
+#include <pthread_np.h> // For pthread_getthreadid_np()
+#endif
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <errno.h>
+#include <unistd.h>
 #endif
 
 #if defined(__NetBSD__)
-#include <lwp.h>
+#include <lwp.h>  // For _lwp_self()
 #endif
 
 #if defined(__linux__)
-#include <unistd.h>
-#include <sys/syscall.h>
+#include <unistd.h> // For syscall()
+#include <sys/syscall.h>  // For syscall codes
 #endif
 
 #if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)