vfio: rework vfio_irq_set payload setting
struct vfio_irq_set from the kernel headers contains a variable sized
array to hold a payload. The vfio_irq_eventfd struct puts the "fd"
member right after this, hoping it to automatically fit in the payload slot.
But having a variable sized type not at the end of a struct is a GNU C
extension, so clang will refuse to compile this.
Solve this by somewhat doing the compiler's job and place the payload
manually at the end of the structure.
Reviewed-by: Jean-Philippe Brucker <firstname.lastname@example.org>
Signed-off-by: Andre Przywara <email@example.com>
Signed-off-by: Will Deacon <firstname.lastname@example.org>
1 file changed