path: root/src/v4l.h
diff options
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 06:02:22 -0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-09-04 07:00:26 -0300
commit3cada8d74f6a4e82538bc17923f27bd3e03f4e8e (patch)
tree082ce856ccbbad8f5f1617992a71797459551ea5 /src/v4l.h
parentab49eda5720583b0470a329434554e97c735e696 (diff)
Centralize include for gtk 2
With gtk 2, a function prototyle is declared on a wrong way. Depending on the gcc flags, this will produce an error: /usr/include/gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration isn’t a prototype [-Werror=strict-prototypes] So, move gtk.h include to v4l.h and ensure that this warning is disabled when including it. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'src/v4l.h')
1 files changed, 5 insertions, 1 deletions
diff --git a/src/v4l.h b/src/v4l.h
index 82c3a1c..c1180f5 100644
--- a/src/v4l.h
+++ b/src/v4l.h
@@ -12,7 +12,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <fcntl.h>
-#include <gtk/gtk.h>
#include <linux/types.h>
#include <linux/videodev2.h>
#include <libv4l2.h>
@@ -20,6 +19,11 @@
#include <png.h>
#include <gconf/gconf-client.h>
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstrict-prototypes"
+#include <gtk/gtk.h>
+#pragma GCC diagnostic pop
#include "camorama-filter-chain.h"
typedef enum {

Privacy Policy