提交 e245afe9 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] videodev2.h: Fix VIDIOC_QUERYMENU ioctl regression

Fixes a regression in VIDIOC_QUERYMENU introduced when the __s64 value
field was added to the union. On a 64-bit system this will change the
size of this v4l2_querymenu structure from 44 to 48 bytes, thus
breaking the ABI. By adding the packed attribute it is working again.

Tested on both 64 and 32 bit systems.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Acked-by: NSakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 52dbb57c
......@@ -1176,7 +1176,7 @@ struct v4l2_querymenu {
__s64 value;
};
__u32 reserved;
};
} __attribute__ ((packed));
/* Control flags */
#define V4L2_CTRL_FLAG_DISABLED 0x0001
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册