Skip to contentSkip to conversation

package/libv4l: fix typeof realated compile failure

PATCH Applied Peter Seiderer 2 participants 2 messages Nov 24, 2021 – Dec 11, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libv4l: fix typeof realated 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);  \
        |  ^~~~~~
---
 package/libv4l/libv4l.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/libv4l/libv4l.mk +2 -2
index b11c8975d1..4dc0f15f94 100644
@@ -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
Signature · 6 lines
2.33.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 7 lines · Peter Seiderer

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

Quoted 7 lines
   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);  \
         |  ^~~~~~

Applied to master, thanks.

Regards,
Arnout

Quoted 10 lines
---
  package/libv4l/libv4l.mk | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
package/libv4l/libv4l.mk +0 -0
index b11c8975d1..4dc0f15f94 100644

package/libv4l/libv4l.mk LIBV4L_CONF_ENV += \ · line 78

Quoted 10 lines
package/libv4l/libv4l.mk +2 -2
@@ -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

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot