The flexible array member should remain the last member in the structure as this assumption is based upon in the code.
Signed-off-by: Elie Richa <ri...@adacore.com> --- slirp/mbuf.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 55170e5..e13ff71 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -82,12 +82,13 @@ struct m_hdr { struct mbuf { struct m_hdr m_hdr; Slirp *slirp; + bool arp_requested; + uint64_t expiration_date; union M_dat { char m_dat_[1]; /* ANSI don't like 0 sized arrays */ char *m_ext_; - } M_dat; - bool arp_requested; - uint64_t expiration_date; + } M_dat; /* This is a "flexible array member". It should always remain + the last member of the structure */ }; #define m_next m_hdr.mh_next -- 1.7.4.1