OSDN Git Service

Improve the Threading code on NetBSD
authorKamil Rytarowski <n54@gmx.com>
Sat, 4 Mar 2017 17:42:46 +0000 (17:42 +0000)
committerKamil Rytarowski <n54@gmx.com>
Sat, 4 Mar 2017 17:42:46 +0000 (17:42 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296973 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/Unix/Threading.inc

index 833b6be..2c528bd 100644 (file)
@@ -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
 #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 *);