diff options
Diffstat (limited to 'lib/stream.h')
| -rw-r--r-- | lib/stream.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/stream.h b/lib/stream.h index ef9366e1ae..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; @@ -133,13 +137,6 @@ struct stream_fifo { #define STREAM_CONCAT_REMAIN(S1, S2, size) ((size) - (S1)->endp - (S2)->endp) -/* deprecated macros - do not use in new code */ -#if CONFDATE > 20181128 -CPP_NOTICE("lib: time to remove deprecated stream.h macros") -#endif -#define STREAM_PNT(S) stream_pnt((S)) -#define STREAM_REMAIN(S) STREAM_WRITEABLE((S)) - /* this macro is deprecated, but not slated for removal anytime soon */ #define STREAM_DATA(S) ((S)->data) @@ -411,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 */ |
