diff --git a/compiler-rt/test/tsan/debug_alloc_stack.cc b/compiler-rt/test/tsan/debug_alloc_stack.cc index 8c205cd47af3..a9383fce8397 100644 --- a/compiler-rt/test/tsan/debug_alloc_stack.cc +++ b/compiler-rt/test/tsan/debug_alloc_stack.cc @@ -7,7 +7,7 @@ #include #include -#if !__APPLE__ +#ifndef __APPLE__ #include #endif @@ -19,7 +19,7 @@ void alloc_func() { mem = (char *)malloc(10); } void *AllocThread(void *context) { uint64_t tid; -#if __APPLE__ +#ifdef __APPLE__ pthread_threadid_np(NULL, &tid); #else tid = gettid();