aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsync-with-kernel.sh2
-rw-r--r--utils/common/v4l2-controls.patch15
2 files changed, 17 insertions, 0 deletions
diff --git a/sync-with-kernel.sh b/sync-with-kernel.sh
index fa881949..e3a70a0b 100755
--- a/sync-with-kernel.sh
+++ b/sync-with-kernel.sh
@@ -29,6 +29,7 @@ fi
cp -a ${KERNEL_DIR}/usr/include/linux/videodev2.h ${TOPSRCDIR}/include/linux
cp -a ${KERNEL_DIR}/usr/include/linux/fb.h ${TOPSRCDIR}/include/linux
cp -a ${KERNEL_DIR}/usr/include/linux/v4l2-controls.h ${TOPSRCDIR}/include/linux
+patch -d ${TOPSRCDIR} --no-backup-if-mismatch -p1 <${TOPSRCDIR}/utils/common/v4l2-controls.patch
cp -a ${KERNEL_DIR}/usr/include/linux/v4l2-common.h ${TOPSRCDIR}/include/linux
cp -a ${KERNEL_DIR}/usr/include/linux/v4l2-subdev.h ${TOPSRCDIR}/include/linux
cp -a ${KERNEL_DIR}/usr/include/linux/v4l2-mediabus.h ${TOPSRCDIR}/include/linux
@@ -103,6 +104,7 @@ function freebsd {
mkdir -p include/linux/$(dirname $i)
cp ${KERNEL_DIR}/usr/include/linux/$i include/linux/$i
done
+ patch -d ${SRCDIR} --no-backup-if-mismatch -p1 <${TOPSRCDIR}/utils/common/v4l2-controls.patch
for i in ivtv.h uinput.h videodev2.h v4l2-common.h; do
sed -e 's/__u8/uint8_t/g' -e 's/__u16/uint16_t/g' -e 's/__u32/uint32_t/g' -e 's/__u64/uint64_t/g' -e 's/__s8/int8_t/g' -e 's/__s16/int16_t/g' -e 's/__s32/int32_t/g' -e 's/__s64/int64_t/g' -e 's/__le32/uint32_t/g' -e 's/__user//g' -i include/linux/$i
diff --git a/utils/common/v4l2-controls.patch b/utils/common/v4l2-controls.patch
new file mode 100644
index 00000000..cf290e0b
--- /dev/null
+++ b/utils/common/v4l2-controls.patch
@@ -0,0 +1,15 @@
+diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h
+index e329974..9db08be 100644
+--- a/include/linux/v4l2-controls.h
++++ b/include/linux/v4l2-controls.h
+@@ -53,6 +53,10 @@
+ #include <linux/const.h>
+ #include <linux/types.h>
+
++#ifndef _BITUL
++#define _BITUL(x) (1U << (x))
++#endif
++
+ /* Control classes */
+ #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */
+ #define V4L2_CTRL_CLASS_CODEC 0x00990000 /* Stateful codec controls */

Privacy Policy