From c23e55d4fd83ee253b4b4e3659a287e635226e11 Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Fri, 11 Apr 2014 16:39:24 +0200 Subject: [PATCH] v4l2-ctl/dbg: include android-config.h header file if ANDROID is set If the ANDROID symbol is defined, done by Android toolchain by default, include the android-config.h header file instead of the autogenerated config.h header file. Android build system is completely different from autoconf and make, and is not capable, without some hacks, to generate the config.h header file. Signed-off-by: Hans-Christian Egtvedt [hans.verkuil@cisco.com: moved config(-android).h include to v4l2-ctl.h] Signed-off-by: Hans Verkuil --- utils/v4l2-ctl/v4l2-ctl-common.cpp | 8 ++------ utils/v4l2-ctl/v4l2-ctl-edid.cpp | 5 ++--- utils/v4l2-ctl/v4l2-ctl-io.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-misc.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-overlay.cpp | 3 --- utils/v4l2-ctl/v4l2-ctl-sdr.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-selection.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-stds.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-streaming.cpp | 5 ----- utils/v4l2-ctl/v4l2-ctl-test-patterns.cpp | 3 --- utils/v4l2-ctl/v4l2-ctl-tuner.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-vbi.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-vidcap.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl-vidout.cpp | 4 ---- utils/v4l2-ctl/v4l2-ctl.cpp | 9 ++------- utils/v4l2-ctl/v4l2-ctl.h | 10 ++++++++++ utils/v4l2-dbg/v4l2-dbg.cpp | 5 +++++ 17 files changed, 21 insertions(+), 63 deletions(-) diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp index 5dafd91..f302eaa 100644 --- a/utils/v4l2-ctl/v4l2-ctl-common.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp @@ -13,22 +13,18 @@ #include #include #include -#include + +#include "v4l2-ctl.h" #ifdef HAVE_SYS_KLOG_H #include #endif -#include - #include #include #include -#include #include -#include "v4l2-ctl.h" - typedef std::map > class2ctrls_map; typedef std::map ctrl_qmap; diff --git a/utils/v4l2-ctl/v4l2-ctl-edid.cpp b/utils/v4l2-ctl/v4l2-ctl-edid.cpp index c01edc2..010dad3 100644 --- a/utils/v4l2-ctl/v4l2-ctl-edid.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-edid.cpp @@ -7,12 +7,11 @@ #include #include #include -#include -#include -#include #include "v4l2-ctl.h" +#include + enum format { HEX, RAW, diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp index eca07e8..e5a045b 100644 --- a/utils/v4l2-ctl/v4l2-ctl-io.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-misc.cpp b/utils/v4l2-ctl/v4l2-ctl-misc.cpp index eef3f82..b418e15 100644 --- a/utils/v4l2-ctl/v4l2-ctl-misc.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-misc.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp index 3cef75c..5bc99a5 100644 --- a/utils/v4l2-ctl/v4l2-ctl-overlay.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-overlay.cpp @@ -13,11 +13,8 @@ #include #include #include -#include -#include #include -#include #include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp index 860eca2..50ee598 100644 --- a/utils/v4l2-ctl/v4l2-ctl-sdr.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-sdr.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-selection.cpp b/utils/v4l2-ctl/v4l2-ctl-selection.cpp index 9f92422..2093470 100644 --- a/utils/v4l2-ctl/v4l2-ctl-selection.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-selection.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-stds.cpp b/utils/v4l2-ctl/v4l2-ctl-stds.cpp index 300ee79..4c7e308 100644 --- a/utils/v4l2-ctl/v4l2-ctl-stds.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-stds.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp index 656e132..6f347a6 100644 --- a/utils/v4l2-ctl/v4l2-ctl-streaming.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-streaming.cpp @@ -14,11 +14,6 @@ #include #include #include -#include - -#include - -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-test-patterns.cpp b/utils/v4l2-ctl/v4l2-ctl-test-patterns.cpp index f7aebac..2b401e0 100644 --- a/utils/v4l2-ctl/v4l2-ctl-test-patterns.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-test-patterns.cpp @@ -3,9 +3,6 @@ #include #include #include -#include - -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp index aeff493..fc84191 100644 --- a/utils/v4l2-ctl/v4l2-ctl-tuner.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-tuner.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp index d7d61bb..49a43f0 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vbi.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vbi.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp index ae0f5c1..c08e3b4 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidcap.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl-vidout.cpp b/utils/v4l2-ctl/v4l2-ctl-vidout.cpp index d24436b..6b2cad0 100644 --- a/utils/v4l2-ctl/v4l2-ctl-vidout.cpp +++ b/utils/v4l2-ctl/v4l2-ctl-vidout.cpp @@ -13,10 +13,6 @@ #include #include #include -#include - -#include -#include #include "v4l2-ctl.h" diff --git a/utils/v4l2-ctl/v4l2-ctl.cpp b/utils/v4l2-ctl/v4l2-ctl.cpp index d5dd82a..fb1c69e 100644 --- a/utils/v4l2-ctl/v4l2-ctl.cpp +++ b/utils/v4l2-ctl/v4l2-ctl.cpp @@ -35,23 +35,18 @@ #include #include #include -#include + +#include "v4l2-ctl.h" #ifdef HAVE_SYS_KLOG_H #include #endif -#include - #include #include #include -#include #include - -#include "v4l2-ctl.h" - char options[OptLast]; static int app_result; diff --git a/utils/v4l2-ctl/v4l2-ctl.h b/utils/v4l2-ctl/v4l2-ctl.h index 4b188d9..4e4038d 100644 --- a/utils/v4l2-ctl/v4l2-ctl.h +++ b/utils/v4l2-ctl/v4l2-ctl.h @@ -1,6 +1,16 @@ #ifndef _V4L2_CTL_H #define _V4L2_CTL_H +#ifdef ANDROID +#include +#else +#include +#endif + +#include + +#include + #ifndef NO_LIBV4L2 #include #else diff --git a/utils/v4l2-dbg/v4l2-dbg.cpp b/utils/v4l2-dbg/v4l2-dbg.cpp index d5ffc12..9986883 100644 --- a/utils/v4l2-dbg/v4l2-dbg.cpp +++ b/utils/v4l2-dbg/v4l2-dbg.cpp @@ -30,7 +30,12 @@ #include #include #include + +#ifdef ANDROID +#include +#else #include +#endif #ifdef HAVE_SYS_KLOG_H #include -- 2.7.4