[llvm] r296973 - Improve the Threading code on NetBSD
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 4 09:42:47 PST 2017
Author: kamil
Date: Sat Mar 4 11:42:46 2017
New Revision: 296973
URL: http://llvm.org/viewvc/llvm-project?rev=296973&view=rev
Log:
Improve the Threading code on NetBSD
Do not include <sys/user.h> on NetBSD. It's dead file and will be removed.
No need to include <sys/sysctl.h> in this code context on NetBSD.
Modified:
llvm/trunk/lib/Support/Unix/Threading.inc
Modified: llvm/trunk/lib/Support/Unix/Threading.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Unix/Threading.inc?rev=296973&r1=296972&r2=296973&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Unix/Threading.inc (original)
+++ llvm/trunk/lib/Support/Unix/Threading.inc Sat Mar 4 11:42:46 2017
@@ -26,6 +26,8 @@
#endif
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include <sys/sysctl.h>
+#include <sys/user.h>
#include <errno.h>
#include <unistd.h>
#endif
@@ -39,11 +41,6 @@
#include <sys/syscall.h> // For syscall codes
#endif
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#include <sys/sysctl.h>
-#include <sys/user.h>
-#endif
-
namespace {
struct ThreadInfo {
void(*UserFn)(void *);
More information about the llvm-commits
mailing list