From e5dc7550a5d1d40caf873bce0f064a820a3bb5a2 Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Mon, 14 Nov 2011 22:10:23 +0000 Subject: Fix Windows build, don't try to #include when we know it's not available. llvm-svn: 144574 --- llvm/unittests/Support/ManagedStatic.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/unittests/Support/ManagedStatic.cpp') diff --git a/llvm/unittests/Support/ManagedStatic.cpp b/llvm/unittests/Support/ManagedStatic.cpp index f1f0320..bfeb0a7 100644 --- a/llvm/unittests/Support/ManagedStatic.cpp +++ b/llvm/unittests/Support/ManagedStatic.cpp @@ -8,7 +8,10 @@ //===----------------------------------------------------------------------===// #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Threading.h" +#include "llvm/Config/config.h" +#ifdef HAVE_PTHREAD_H #include +#endif #include "gtest/gtest.h" @@ -16,6 +19,7 @@ using namespace llvm; namespace { +#ifdef HAVE_PTHREAD_H namespace test1 { llvm::ManagedStatic ms; void *helper(void*) { @@ -35,5 +39,6 @@ TEST(Initialize, MultipleThreads) { pthread_join(t2, NULL); llvm_stop_multithreaded(); } +#endif } // anonymous namespace -- cgit v1.1