summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2006-04-17 17:55:41 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2006-04-17 17:55:41 +0000
commite3955a05e41d03a904ed66ce1d818f95572895e7 (patch)
tree8ce4afc7a0c4b5534e2cdcc1c05ee64a5b75076e /llvm/lib
parent264c908e3aa0a96a5abe7a07539b9f3d1159601c (diff)
downloadbcm5719-llvm-e3955a05e41d03a904ed66ce1d818f95572895e7.tar.gz
bcm5719-llvm-e3955a05e41d03a904ed66ce1d818f95572895e7.zip
Add checks for __OpenBSD__.
llvm-svn: 27761
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/System/Mutex.cpp2
-rw-r--r--llvm/lib/Target/CBackend/Writer.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/System/Mutex.cpp b/llvm/lib/System/Mutex.cpp
index 33dff053315..abcf77e6751 100644
--- a/llvm/lib/System/Mutex.cpp
+++ b/llvm/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/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp
index 4e86c6fec0d..904101287ab 100644
--- a/llvm/lib/Target/CBackend/Writer.cpp
+++ b/llvm/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"
OpenPOWER on IntegriCloud