aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/System/Mutex.cpp2
-rw-r--r--lib/Target/CBackend/CBackend.cpp2
-rw-r--r--lib/Target/CBackend/Writer.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/System/Mutex.cpp b/lib/System/Mutex.cpp
index 33dff05331..abcf77e675 100644
--- a/lib/System/Mutex.cpp
+++ b/lib/System/Mutex.cpp
@@ -75,7 +75,7 @@ Mutex::Mutex( bool recursive)
errorcode = pthread_mutexattr_settype(&attr, kind);
assert(errorcode == 0);
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
// Make it a process local mutex
errorcode = pthread_mutexattr_setpshared(&attr, PTHREAD_PROCESS_PRIVATE);
#endif
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index 4e86c6fec0..904101287a 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -813,7 +813,7 @@ static void generateCompilerSpecificCode(std::ostream& Out) {
<< "extern void *__builtin_alloca(unsigned int);\n"
<< "#endif\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
- << "#elif defined(__FreeBSD__)\n"
+ << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#elif !defined(_MSC_VER)\n"
<< "#include <alloca.h>\n"
diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp
index 4e86c6fec0..904101287a 100644
--- a/lib/Target/CBackend/Writer.cpp
+++ b/lib/Target/CBackend/Writer.cpp
@@ -813,7 +813,7 @@ static void generateCompilerSpecificCode(std::ostream& Out) {
<< "extern void *__builtin_alloca(unsigned int);\n"
<< "#endif\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
- << "#elif defined(__FreeBSD__)\n"
+ << "#elif defined(__FreeBSD__) || defined(__OpenBSD__)\n"
<< "#define alloca(x) __builtin_alloca(x)\n"
<< "#elif !defined(_MSC_VER)\n"
<< "#include <alloca.h>\n"