Skip to contentSkip to conversation

package/hiawatha: fix build with gcc 4.8

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jan 14, 2022 – Feb 1, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/hiawatha: fix build with gcc 4.8

Fix the following build failure raised since commit 4e36e8f2081a66f477dd038793082045876d65ee:

/tmp/instance-1/output-1/build/hiawatha-11.1/mbedtls/library/ecjpake.c: In function 'self_test_rng':
/tmp/instance-1/output-1/build/hiawatha-11.1/mbedtls/library/ecjpake.c:973:5: error: 'for' loop initial declarations are only allowed in C99 mode

     for( size_t i = 0; i < len; i++ )
     ^

Fixes:
- http://autobuild.buildroot.org/results/1befc1552af91f34c600229138910c2078c2fdca

---
 package/hiawatha/hiawatha.mk | 1 +
 1 file changed, 1 insertion(+)
package/hiawatha/hiawatha.mk +1 -0
index 14d3c9f1ee..25da98a43c 100644
@@ -15,6 +15,7 @@ HIAWATHA_CPE_ID_VENDOR = hiawatha-webserver
 HIAWATHA_CONF_OPTS = \
 	-DINSTALL_MBEDTLS_HEADERS=OFF \
 	-DUSE_SYSTEM_MBEDTLS=OFF \
+	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -std=c99" \
 	-DENABLE_TOOLKIT=OFF \
 	-DCONFIG_DIR=/etc/hiawatha \
 	-DLOG_DIR=/var/log \
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 5 lines · Fabrice Fontaine

Fix the following build failure raised since commit 4e36e8f2081a66f477dd038793082045876d65ee:

/tmp/instance-1/output-1/build/hiawatha-11.1/mbedtls/library/ecjpake.c: In function 'self_test_rng':
/tmp/instance-1/output-1/build/hiawatha-11.1/mbedtls/library/ecjpake.c:973:5: error: 'for' loop initial declarations are only allowed in C99 mode

Quoted 7 lines
      for( size_t i = 0; i < len; i++ )
      ^

Fixes:
- http://autobuild.buildroot.org/results/1befc1552af91f34c600229138910c2078c2fdca

Applied to master, thanks.

Regards,
Arnout

Quoted 9 lines
---
  package/hiawatha/hiawatha.mk | 1 +
  1 file changed, 1 insertion(+)
package/hiawatha/hiawatha.mk +0 -0
index 14d3c9f1ee..25da98a43c 100644

package/hiawatha/hiawatha.mk HIAWATHA_CPE_ID_VENDOR = hiawatha-webserver · line 21

Quoted 7 lines
package/hiawatha/hiawatha.mk +1 -0
@@ -15,6 +15,7 @@ HIAWATHA_CPE_ID_VENDOR = hiawatha-webserver
  HIAWATHA_CONF_OPTS = \
  	-DINSTALL_MBEDTLS_HEADERS=OFF \
  	-DUSE_SYSTEM_MBEDTLS=OFF \
+	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -std=c99" \
  	-DENABLE_TOOLKIT=OFF \
  	-DCONFIG_DIR=/etc/hiawatha \
  	-DLOG_DIR=/var/log \

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