summaryrefslogtreecommitdiff
path: root/compiler.h
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2015-05-16 02:47:28 +0300
committerGary E. Miller <gem@rellim.com>2015-05-15 16:50:11 -0700
commit79f6d9133378325d70a92e66f7352c1becefbb88 (patch)
tree70f3d2b80b3a3e76bee36f678830f633379185dd /compiler.h
parent0f6c70745415711a4b6c01046430e787a678cef1 (diff)
downloadgpsd-79f6d9133378325d70a92e66f7352c1becefbb88.tar.gz
Include <stdatomic.h> only in C mode.
Signed-off-by: Gary E. Miller <gem@rellim.com>
Diffstat (limited to 'compiler.h')
-rw-r--r--compiler.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler.h b/compiler.h
index 837c9354..03430c03 100644
--- a/compiler.h
+++ b/compiler.h
@@ -66,9 +66,9 @@
} while (0)
#ifdef HAVE_STDATOMIC_H
-#ifndef __COVERITY__ /* Coverity is confused by a GNU typedef */
+#if !defined(__COVERITY__) && !defined(__cplusplus)
#include <stdatomic.h>
-#endif /* __COVERITY__ */
+#endif /* __COVERITY__ || __cplusplus */
#endif /* HAVE_STDATOMIC_H */
#ifdef HAVE_OSATOMIC_H