From 7b2da3caaf87e44b0e3a8d72d43135b123e38bb6 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Wed, 24 Nov 2021 21:12:55 +0100 Subject: [PATCH] package/libv4l: fix typeof related compile failure In case Qt support is enabled use '-std=gnu++11' instead of '-std=c++11' to enable c++11 support and gain support of the typeof GNU extension. Fixes: - http://autobuild.buildroot.net/results/2d58906a1eefdf921b42f6c0d9fd680ef2ad6e27 In file included from v4l2-ctl-streaming.cpp:14: ../../utils/common/v4l2-tpg.h: In function 'void tpg_s_hue(tpg_data*, s16)': ../../utils/common/v4l2-tpg.h:49:2: error: 'typeof' was not declared in this scope 49 | typeof(val) __val = (val); \ | ^~~~~~ Signed-off-by: Peter Seiderer Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- package/libv4l/libv4l.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk index b11c8975d1..4dc0f15f94 100644 --- a/package/libv4l/libv4l.mk +++ b/package/libv4l/libv4l.mk @@ -71,8 +71,8 @@ LIBV4L_CONF_ENV += \ ac_cv_prog_MOC=$(HOST_DIR)/bin/moc \ ac_cv_prog_RCC=$(HOST_DIR)/bin/rcc \ ac_cv_prog_UIC=$(HOST_DIR)/bin/uic -# qt5 needs c++11 (since qt-5.7) -LIBV4L_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11" +# qt5 needs c++11 (since qt-5.7)/use gnu++11 for typeof support +LIBV4L_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++11" else LIBV4L_CONF_OPTS += --disable-qv4l2 endif