From 057f4ea07ee69add7873deccb18949b258195ee6 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 23 Jul 2015 11:58:28 -0700 Subject: [PATCH] avoid linking against ___cxa_guard_acquire and ___cxa_guard_release. Fixes build with clang on OSX. --- src/os.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/os.cpp b/src/os.cpp index a5ba534..a861e42 100644 --- a/src/os.cpp +++ b/src/os.cpp @@ -195,9 +195,9 @@ static void *run_pthread(void *userdata) { } #endif +static atomic_flag rtprio_seen = ATOMIC_FLAG_INIT; static void emit_rtprio_warning(void) { - static atomic_flag seen = ATOMIC_FLAG_INIT; - if (!seen.test_and_set()) { + if (!rtprio_seen.test_and_set()) { fprintf(stderr, "warning: unable to set high priority thread: Operation not permitted\n"); fprintf(stderr, "See https://github.com/andrewrk/genesis/wiki/" "warning:-unable-to-set-high-priority-thread:-Operation-not-permitted\n");