musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/misc/ioctl.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@kernel.org>2020年12月13日 21:43:16 -0500
committerRich Felker <dalias@aerifal.cx>2020年12月14日 20:36:03 -0500
commit30f55067a6dcba602797c24e020a6a9c8ba22180 (patch)
tree0eefe900b487b62197071f658e65320c2378b098 /src/misc/ioctl.c
parentdb981ffb3e242e32e13520fbaf47e91ae88d5ff4 (diff)
downloadmusl-30f55067a6dcba602797c24e020a6a9c8ba22180.tar.gz
fix v4l2 buffer ioctl fallbacks for pre-5.6 kernels
commit 2412638bb39eb799b2600393bbd71cca8ae96bb2 got the size of struct v4l2_buffer wrong and omitted the tv_usec member slot from the offset list, so the ioctl numbers never matched and fallback code path was never taken. this caused the affected ioctls to fail with ENOTTY on kernels not new enough to have the native time64 ioctls.
Diffstat (limited to 'src/misc/ioctl.c')
-rw-r--r--src/misc/ioctl.c 8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/misc/ioctl.c b/src/misc/ioctl.c
index 89477511..26481c6d 100644
--- a/src/misc/ioctl.c
+++ b/src/misc/ioctl.c
@@ -49,10 +49,10 @@ static const struct ioctl_compat_map compat_map[] = {
{ 0, 0, 8, WR, 1, OFFS(0,4) }, /* snd_pcm_mmap_control */
/* VIDIOC_QUERYBUF, VIDIOC_QBUF, VIDIOC_DQBUF, VIDIOC_PREPARE_BUF */
- { _IOWR('V', 9, new_misaligned(72)), _IOWR('V', 9, char[72]), 72, WR, 0, OFFS(20) },
- { _IOWR('V', 15, new_misaligned(72)), _IOWR('V', 15, char[72]), 72, WR, 0, OFFS(20) },
- { _IOWR('V', 17, new_misaligned(72)), _IOWR('V', 17, char[72]), 72, WR, 0, OFFS(20) },
- { _IOWR('V', 93, new_misaligned(72)), _IOWR('V', 93, char[72]), 72, WR, 0, OFFS(20) },
+ { _IOWR('V', 9, new_misaligned(68)), _IOWR('V', 9, char[68]), 68, WR, 1, OFFS(20, 24) },
+ { _IOWR('V', 15, new_misaligned(68)), _IOWR('V', 15, char[68]), 68, WR, 1, OFFS(20, 24) },
+ { _IOWR('V', 17, new_misaligned(68)), _IOWR('V', 17, char[68]), 68, WR, 1, OFFS(20, 24) },
+ { _IOWR('V', 93, new_misaligned(68)), _IOWR('V', 93, char[68]), 68, WR, 1, OFFS(20, 24) },
/* VIDIOC_DQEVENT */
{ _IOR('V', 89, new_misaligned(96)), _IOR('V', 89, char[96]), 96, R, 0, OFFS(76,80) },
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月23日 15:22:56 +0000

AltStyle によって変換されたページ (->オリジナル) /