summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unittests/Support/ManagedStatic.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Support/ManagedStatic.cpp b/unittests/Support/ManagedStatic.cpp
index b1df2bd6d2..a4137619f4 100644
--- a/unittests/Support/ManagedStatic.cpp
+++ b/unittests/Support/ManagedStatic.cpp
@@ -32,7 +32,9 @@ namespace test1 {
void *allocate_stack(pthread_attr_t &a, size_t n = 65536) {
void *stack = malloc(n);
pthread_attr_init(&a);
+#if defined(__linux__)
pthread_attr_setstack(&a, stack, n);
+#endif
return stack;
}
}