Message ID | 20211124201255.6736-1-ps.report@gmx.net |
---|---|
State | Accepted |
Headers | show |
Series | [PATCH/next,v1] package/libv4l: fix typeof realated compile failure | expand |
On 24/11/2021 21:12, Peter Seiderer wrote: > 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@gmx.net> Applied to master, thanks. Regards, Arnout > --- > 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 >
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
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@gmx.net> --- package/libv4l/libv4l.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)