Skip to content

Commit

Permalink
[media] videodev2.h: Fix VIDIOC_QUERYMENU ioctl regression
Browse files Browse the repository at this point in the history
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: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Apr 19, 2012
1 parent 52dbb57 commit e245afe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/videodev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ struct v4l2_querymenu {
__s64 value;
};
__u32 reserved;
};
} __attribute__ ((packed));

/* Control flags */
#define V4L2_CTRL_FLAG_DISABLED 0x0001
Expand Down

0 comments on commit e245afe

Please sign in to comment.