summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/cxa_exception.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 64040fd6885..9bc6ad6fd04 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -11,13 +11,15 @@
//
//===----------------------------------------------------------------------===//
+#include "config.h"
#include "cxxabi.h"
#include <exception> // for std::terminate
#include <cstdlib> // for malloc, free
#include <cstring> // for memset
-#include <pthread.h>
-
+#if !LIBCXXABI_SINGLE_THREADED
+# include <pthread.h> // for fallback_malloc.ipp's mutexes
+#endif
#include "cxa_exception.hpp"
#include "cxa_handlers.hpp"
OpenPOWER on IntegriCloud