diff --git a/src/libs/compat/freebsd_network/compat/sys/mbuf.h b/src/libs/compat/freebsd_network/compat/sys/mbuf.h index c6d2d42539..f26227cbc6 100644 --- a/src/libs/compat/freebsd_network/compat/sys/mbuf.h +++ b/src/libs/compat/freebsd_network/compat/sys/mbuf.h @@ -129,7 +129,7 @@ void m_extadd(struct mbuf *m, caddr_t buffer, u_int size, void (*freeHook)(void *, void *), void *args, int flags, int type); -#define mtod(m, type) (type)((m)->m_data) +#define mtod(m, type) ((type)((m)->m_data)) #define m_tag_delete(mb, tag) \ panic("m_tag_delete unsupported."); @@ -144,6 +144,7 @@ void m_extadd(struct mbuf *m, caddr_t buffer, u_int size, extern int max_linkhdr; extern int max_protohdr; +extern int max_hdr; #include diff --git a/src/libs/compat/freebsd_network/mbuf.c b/src/libs/compat/freebsd_network/mbuf.c index 46a8114247..a496ea73ec 100644 --- a/src/libs/compat/freebsd_network/mbuf.c +++ b/src/libs/compat/freebsd_network/mbuf.c @@ -25,6 +25,8 @@ static object_cache *sChunkCache; int max_linkhdr = 16; int max_protohdr = 40 + 20; /* ip6 + tcp */ +/* max_linkhdr + max_protohdr, but that's not allowed by gcc. */ +int max_hdr = 16 + 40 + 20; static int m_to_oc_flags(int how)