编译qsdk出现error: 'for' loop initial declarations are only allowed in C99 mode错误

问题描述:

       编译qsdk出现error: 'for' loop initial declarations are only allowed in C99 mode错误

Log信息:

      mtune=cortex-a7 -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -mfloat-abi=soft -Wl,-z,now -Wl,-z,relro -Wall -W -Wshadow -pedantic -MT mod_vhostdb.lo -MD -MP -MF .deps/mod_vhostdb.Tpo -c mod_vhostdb.c  -fPIC -DPIC -o .libs/mod_vhostdb.o
mod_vhostdb.c: In function 'mod_vhostdb_set_defaults':
mod_vhostdb.c:69:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (size_t i = 0; i < srv->config_context->used; ++i) {
     ^
mod_vhostdb.c:69:5: note: use option -std=c99 or -std=gnu99 to compile your code
mod_vhostdb.c: In function 'mod_vhostdb_patch_connection':
mod_vhostdb.c:104:5: error: 'for' loop initial declarations are only allowed in C99 mode
     for (size_t i = 1; i < srv->config_context->used; ++i) {
     ^
mod_vhostdb.c:112:9: error: 'for' loop initial declarations are only allowed in C99 mode
         for (size_t j = 0; j < dc->value->used; ++j) {
         ^
Makefile:1947: recipe for target 'mod_vhostdb.lo' failed
make[6]: *** [mod_vhostdb.lo] Error 1
make[6]: Leaving directory '/home/wellnw/qsdk53/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/lighttpd-1.4.48/src'
Makefile:1426: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/home/wellnw/qsdk53/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/lighttpd-1.4.48/src'
Makefile:447: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/wellnw/qsdk53/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/lighttpd-1.4.48'
Makefile:377: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/wellnw/qsdk53/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/lighttpd-1.4.48'
Makefile:197: recipe for target '/home/wellnw/qsdk53/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/lighttpd-1.4.48/.built' failed
make[2]: *** [/home/wellnw/qsdk53/build_dir/target-arm_cortex-a7_uClibc-1.0.14_eabi/lighttpd-1.4.48/.built] Error 2
make[2]: Leaving directory '/home/wellnw/qsdk53/feeds/gli_pub/lighttpd'
package/Makefile:191: recipe for target 'package/feeds/gli_pub/lighttpd/compile' failed
make[1]: *** [package/feeds/gli_pub/lighttpd/compile] Error 2
make[1]: Leaving directory '/home/wellnw/qsdk53'
/home/wellnw/qsdk53/include/toplevel.mk:186: recipe for target 'package/feeds/gli_pub/lighttpd/compile' failed
make: *** [package/feeds/gli_pub/lighttpd/compile] Error 2

解决方案:

       找到 package/feeds/gli_pub/lighttpd/Makefile 文件,在Makefile开头增加以下内容即可

        TARGET_CFLAGS += -std=gnu99

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
QSDK(Qualcomm Software Development Kit)是由高通公司提供的一套软件开发工具,用于构建和定制高通芯片上运行的嵌入式操作系统的固件。QSDK提供了一个全面的解决方案,包括了QCA的无线网络驱动程序、TCP/IP协议栈、网络管理、应用程序接口(API)等。 QSDK的内核版本通常是指嵌入式操作系统的内核,如Linux内核。内核是操作系统的核心,负责管理硬件资源、提供进程管理和调度、实现文件系统等功能。根据不同的硬件平台和应用需求,QSDK可能使用不同版本的内核。 QSDK的固件版本则是指QSDK软件开发工具包中各个组件的版本,如无线驱动程序、网络管理工具等。固件版本不仅包括了高通公司自己开发的软件组件,还可能包括第三方软件的集成,如OpenWrt等。新版本的QSDK通常会带来更好的性能、更稳定的功能以及更强大的扩展能力。 为了确保系统的安全性和稳定性,使用QSDK开发的设备通常会定期更新内核和固件版本。更新内核版本可以修复漏洞、改进性能和稳定性,同时也能够引入新的功能和改进。更新固件版本可以获得新的特性、修复已知问题,并加强设备的安全性。 总之,QSDK提供了一套全面的软件开发工具,用于构建和定制高通芯片上运行的嵌入式操作系统的固件。内核版本和固件版本是这个开发工具的重要组成部分,通过更新版本,可以获得更好的性能、更稳定的功能和更强大的扩展能力。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

wellnw

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值