Hi Sakari,

This patch 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.verk...@cisco.com>

Regards,

        Hans

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index e69cacc..5a09ac3 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -1176,7 +1176,7 @@ struct v4l2_querymenu {
                __s64   value;
        };
        __u32           reserved;
-};
+} __attribute__ ((packed));
 
 /*  Control flags  */
 #define V4L2_CTRL_FLAG_DISABLED                0x0001
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to