summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-09-16 07:58:39 -0400
committerEric S. Raymond <esr@thyrsus.com>2015-09-16 07:58:39 -0400
commit833bd1bed41a7c090e16cdc69d15f9c5c6842c9c (patch)
tree897f7f529cd7824a27302b098eff60a4c5bf0314 /compiler.h
parentf8c3e22e718e073f67e203875f45f536d18de2af (diff)
downloadgpsd-833bd1bed41a7c090e16cdc69d15f9c5c6842c9c.tar.gz
Fix incirrect conditionalization.
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler.h b/compiler.h
index 03430c03..2f2a8edb 100644
--- a/compiler.h
+++ b/compiler.h
@@ -73,12 +73,12 @@
#ifdef HAVE_OSATOMIC_H
#include <libkern/OSAtomic.h>
-#endif /* HAVE_STDATOMIC_H */
+#endif /* HAVE_OSATOMIC_H */
static inline void memory_barrier(void)
/* prevent instruction reordering across any call to this function */
{
-#ifdef _STDATOMIC_H
+#ifdef HAVE_STDATOMIC_H
#ifndef __COVERITY__
atomic_thread_fence(memory_order_seq_cst);
#endif /* __COVERITY__ */
@@ -86,7 +86,7 @@ static inline void memory_barrier(void)
OSMemoryBarrier();
#elif defined(__GNUC__)
asm volatile ("" : : : "memory");
-#endif /* STD_ATOMIC_H */
+#endif /* HAVE_STD_ATOMIC_H */
}
#endif /* _GPSD_COMPILER_H_ */