[Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-25 Thread Samuel Thibault
struct mbuf uses an open char array to allow inlining data, and we aim at using a C99 flexible array. Inlining this in another structure is however a GNU extension. The inlines used so far in struct Slirp were actually only needed as head of struct mbuf lists. This replaces these inline with mere s

Re: [Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-25 Thread Samuel Thibault
Peter Maydell, on Thu 25 Feb 2016 15:22:25 +, wrote: > On 22 February 2016 at 21:29, Samuel Thibault > wrote: > > struct mbuf uses a C99 open char array to allow inlining data. > > At the moment it doesn't, it uses a 1 byte array :-) Turning that > into a C99 flexible array is what we'd like

Re: [Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-25 Thread Peter Maydell
On 22 February 2016 at 21:29, Samuel Thibault wrote: > struct mbuf uses a C99 open char array to allow inlining data. At the moment it doesn't, it uses a 1 byte array :-) Turning that into a C99 flexible array is what we'd like to do... > Inlining > this in another structure is however a GNU ext

[Qemu-devel] [PATCH] Avoid embedding struct mbuf in other structures

2016-02-22 Thread Samuel Thibault
struct mbuf uses a C99 open char array to allow inlining data. Inlining this in another structure is however a GNU extension. The inlines used so far in struct Slirp were actually only needed as head of struct mbuf lists. This replaces these inline with mere struct quehead, and use casts as appropr