Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.

llvm-svn: 177310
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 69e76f80e28fc969631a6b191f394c8ffc1618b1
diff --git a/src/thread.cpp b/src/thread.cpp
index 1acb131..7a06b29 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -14,7 +14,7 @@
 #include "limits"
 #include <sys/types.h>
 #if !defined(_WIN32)
-#if !__sun__ && !__linux__
+#if !defined(__sun__) && !defined(__linux__)
 #include <sys/sysctl.h>
 #else
 #include <unistd.h>