Skip to content

Commit 2be6a0f

Browse files
mizmaredmooring
authored andcommitted
Remove nested structs in header
Nested structs and unions have different visibility rules in C and C++. Fixes !178
1 parent e558ab3 commit 2be6a0f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/include/openamp/virtqueue.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ struct virtqueue_buf {
5252
int len;
5353
};
5454

55+
struct vq_desc_extra {
56+
void *cookie;
57+
uint16_t ndescs;
58+
};
59+
5560
struct virtqueue {
5661
struct virtio_device *vq_dev;
5762
const char *vq_name;
@@ -93,10 +98,7 @@ struct virtqueue {
9398
* Other fields in this structure are not used currently.
9499
*/
95100

96-
struct vq_desc_extra {
97-
void *cookie;
98-
uint16_t ndescs;
99-
} vq_descx[0];
101+
struct vq_desc_extra vq_descx[0];
100102
};
101103

102104
/* struct to hold vring specific information */

0 commit comments

Comments
 (0)