Skip to content

Commit 53db01d

Browse files
committed
fix to MAKE on GCC 10+ (worked on RHEL 9 using GCC 11). Thanks to Netflix#775
1 parent db7590f commit 53db01d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/dyn_ring_queue.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
#include "dyn_gossip.h"
1212
#include "dyn_token.h"
1313

14+
_C2G_InQ C2G_InQ = {};
15+
_C2G_OutQ C2G_OutQ = {};
16+
1417
// should use pooling to store struct ring_message so that we can reuse
1518
struct ring_msg *create_ring_msg(void) {
1619
struct ring_msg *msg = dn_alloc(sizeof(*msg));

src/dyn_ring_queue.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,20 @@ struct gossip_node;
1616
typedef rstatus_t (*callback_t)(void *msg);
1717
typedef void (*data_func_t)(void *);
1818

19-
volatile struct {
19+
typedef volatile struct {
2020
long m_getIdx;
2121
long m_putIdx;
2222
void *m_entry[C2G_InQ_SIZE];
23-
} C2G_InQ;
23+
} _C2G_InQ;
2424

25-
volatile struct {
25+
typedef volatile struct {
2626
long m_getIdx;
2727
long m_putIdx;
2828
void *m_entry[C2G_OutQ_SIZE];
29-
} C2G_OutQ;
29+
} _C2G_OutQ;
30+
31+
extern _C2G_InQ C2G_InQ;
32+
extern _C2G_OutQ C2G_OutQ;
3033

3134
struct ring_msg {
3235
callback_t cb;

0 commit comments

Comments
 (0)