mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
v4l2: Define ioctl_req_t for posix/linux case
this is an issue seen with musl based linux distros e.g. alpine [1] musl is not going to change this since it breaks ABI/API interfaces Newer compilers are stringent ( e.g. clang16 ) which can now detect signature mismatches in function pointers too, existing code warned but did not error with older clang Fixes gstv4l2object.c:544:23: error: incompatible function pointer types assigning to 'gint (*)(gint, ioctl_req_t, ...)' (aka 'int (*)(int, unsigned long, ...)') from 'int (int, int, ...)' [-Wincompatible-function-pointer-types] v4l2object->ioctl = ioctl; ^ ~~~~~ [1] https://gitlab.alpinelinux.org/alpine/aports/-/issues/7580 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3950>
This commit is contained in:
parent
1cabfebd2f
commit
817339c4de
1 changed files with 2 additions and 0 deletions
|
@ -76,6 +76,8 @@ typedef gboolean (*GstV4l2UpdateFpsFunction) (GstV4l2Object * v4l2object);
|
|||
* 'unsigned long' for the 2nd parameter */
|
||||
#ifdef __ANDROID__
|
||||
typedef unsigned ioctl_req_t;
|
||||
#elif defined(__linux__) && !defined(__GLIBC__) /* musl/linux */
|
||||
typedef int ioctl_req_t;
|
||||
#else
|
||||
typedef gulong ioctl_req_t;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue