]> granicus.if.org Git - strace/commitdiff
v4l2: fix build with old kernel headers
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 14 May 2016 00:36:27 +0000 (00:36 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 14 May 2016 00:36:27 +0000 (00:36 +0000)
Prior to v2.6.25-rc3, <linux/videodev2.h> didn't include all
required headers, resulting to omission of V4L2_* constants.

This issue doesn't arise in v4l2.c and tests/ioctl_v4l2.c files
because they already include all necessary headers themselves.

* configure.ac (AC_CHECK_DECLS): Include <sys/time.h>, <linux/ioctl.h>,
and <linux/types.h> before <linux/videodev2.h>.

configure.ac

index b0758ae167b8f05471e57be10399450adecad632..e50390e74451b8af231b97e36776200166c88a86 100644 (file)
@@ -837,7 +837,10 @@ AC_CHECK_DECLS(m4_normalize([
        V4L2_CTRL_TYPE_STRING,
        V4L2_CTRL_TYPE_BITMASK,
        V4L2_CTRL_TYPE_INTEGER_MENU
-]),,, [#include <linux/videodev2.h>])
+]),,, [#include <sys/time.h>
+#include <linux/ioctl.h>
+#include <linux/types.h>
+#include <linux/videodev2.h>])
 
 AC_CACHE_CHECK([for BLKGETSIZE64], [ac_cv_have_blkgetsize64],
        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([