kbingham / libcamera

libcamera - Making complex cameras easy. This is a personal fork, please use the upstream repository at https://git.libcamera.org/libcamera/libcamera.git/
https://libcamera.org
Other
173 stars 69 forks source link

Specify packed attribute to union #40

Closed tewarid closed 2 years ago

tewarid commented 2 years ago

Fixes clang error: field within 'v4l2_ext_control' is less aligned than 'v4l2_ext_control::(anonymous union

Signed-off-by: Devendra Tewari devendra.tewari@gmail.com

kbingham commented 2 years ago

Interesting, this file is actually from the linux kernel, so if it needs to be fixed - it needs to be fixed there, then imported here. Can you check if this is still an issue in the main linux kernel ? or if it has already been fixed there?

tewarid commented 2 years ago

Raspberry Pi kernel has the same issue. My own kernel build via yocto is using gcc whereas libcamera is built using clang version 14.0.1. 🤔

kbingham commented 2 years ago

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/videodev2.h#n1742 is the upstream kernel link - and it seems relevant there.

Would you like to submit a patch to the linux kernel / linux-media mailing list?

tewarid commented 2 years ago

Thanks - I'll submit the patch upstream.

tewarid commented 2 years ago

Patch has been submitted upstream but doesn't look like any one has looked at it in a while https://patchwork.kernel.org/project/linux-media/patch/20220422192031.24895-1-devendra.tewari@gmail.com/.