GNOME Bugzilla – Bug 726453
v4l2 plugin broken due to bundeling of videodev2.h
Last modified: 2014-03-16 16:45:16 UTC
A copy of the videodev2.h header was recently bundled with the v4l2 plugin. The problem is that it uses __u32 and simular types that aren't portable to other OS's. The easy solution is to add typedef's to map the unknown types to common types. Doing it this way also allows for easy diffing with videodev2.h upstream for changes to this file.
Created attachment 272057 [details] [review] Add mapping code to videodev2.h
(In reply to comment #0) > The easy solution is to add typedef's to map the unknown types to common types. > Doing it this way also allows for easy diffing with videodev2.h upstream for > changes to this file. Indeed you are right. Thanks for reporting. I think we could also map to GLib associated types, I'll post of patch over here, so you can test before I merged it.
Created attachment 272059 [details] [review] Add support for other OS like FreeBSD Let me know if that works for FreeBSD.
Note, this patch has the benefit that it removes the dependency on having Linux kernel headers, which I just realized I don't check explicitly in the configure.ac.
Review of attachment 272059 [details] [review]: This new patch also fixes compile on FreeBSD.
Comment on attachment 272059 [details] [review] Add support for other OS like FreeBSD commit 155d66684573161e2e4e10b9368bdf7e2f3a86ff Author: Nicolas Dufresne <nicolas.dufresne@collabora.com> Date: Sun Mar 16 15:26:04 2014 +0100 v4l2: Add types compatiblity for other OS Adds type compatiblity with other OS like BSD. This uses types mapping macro to avoid conflict with existing defined types. We resuse glib types as these are already available on supported platforms. This is GCC only because of the le32 type that uses bitwise attribute. https://bugzilla.gnome.org/show_bug.cgi?id=726453