diff options
-rw-r--r-- | llvm/unittests/Support/ManagedStatic.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/unittests/Support/ManagedStatic.cpp b/llvm/unittests/Support/ManagedStatic.cpp index b1df2bd6d21..a4137619f4d 100644 --- a/llvm/unittests/Support/ManagedStatic.cpp +++ b/llvm/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; } } |