summaryrefslogtreecommitdiff
path: root/lib/stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stream.h')
-rw-r--r--lib/stream.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/stream.h b/lib/stream.h
index 32b6fb5af1..5341bfa40b 100644
--- a/lib/stream.h
+++ b/lib/stream.h
@@ -28,6 +28,10 @@
#include "mpls.h"
#include "prefix.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* A stream is an arbitrary buffer, whose contents generally are assumed to
* be in network order.
@@ -115,9 +119,9 @@ struct stream_fifo {
pthread_mutex_t mtx;
/* number of streams in this fifo */
- _Atomic size_t count;
+ atomic_size_t count;
#if defined DEV_BUILD
- _Atomic size_t max_count;
+ atomic_size_t max_count;
#endif
struct stream *head;
@@ -404,4 +408,8 @@ static inline uint8_t *ptr_get_be32(uint8_t *ptr, uint32_t *out)
goto stream_failure; \
} while (0)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ZEBRA_STREAM_H */