[Buildroot] [PATCH 1/1] package/kismet: fix build with gcc 9

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sun Aug 23 21:33:37 UTC 2020


Hello Fabrice,

On Sat, 22 Aug 2020 22:23:50 +0200
Fabrice Fontaine <fontaine.fabrice at gmail.com> wrote:

> + typedef struct {
> +-	struct cmsghdr header;
> + 	int            fd;
> ++	struct cmsghdr header;

Are you sure this fix is correct ?

The cmsghdr structure, as its name suggest, is meant to be the "header
of a message", and that's why it has this zero-length array at the end,
to access the payload of the message. I am not sure what the
consequences are in this specific case, but do you have some
evidence/explanation that this is correct, beyond "it builds fine" ?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


More information about the buildroot mailing list