[Buildroot] [PATCH/next v1] package/libv4l: fix typeof realated compile failure

Peter Seiderer ps.report at gmx.net
Wed Nov 24 20:12:55 UTC 2021


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 <ps.report at gmx.net>
---
 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
-- 
2.33.1



More information about the buildroot mailing list