summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-02-28 00:46:32 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-02-28 00:46:32 -0500
commitb6e4309ac133d6afa54602dd32b5c95ffcd37310 (patch)
treeb9a2f3daf36a19c04b164957f05cd1856ee8f6ef /compiler.h
parentf07730966ca55c9bc92e7a2d21261e2459c080e2 (diff)
downloadgpsd-b6e4309ac133d6afa54602dd32b5c95ffcd37310.tar.gz
Repair inclusion of stdatomic.h.
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler.h b/compiler.h
index f46b05f0..beaea478 100644
--- a/compiler.h
+++ b/compiler.h
@@ -7,7 +7,7 @@
#ifndef _GPSD_COMPILER_H_
#define _GPSD_COMPILER_H_
-#include "gpsd_config.h" /* is STD_ATOMIC_H defined? */
+#include "gpsd_config.h" /* is HAVE_STDATOMIC defined? */
/* Macro for declaring function with printf-like arguments. */
# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
@@ -31,6 +31,10 @@
assert(locresult != -23); \
} while (0)
+#ifdef HAVE_STDATOMIC
+#include <stdatomic.h>
+#endif /* HAVE_STDATOMIC */
+
static /*@unused@*/ inline void memory_barrier(void)
{
#ifndef S_SPLINT_S