openwrt on mini2440

在openwrt dream-box官网下载openwrt源码,其中支持mini2440 boards

https://dev.openwrt.org.cn/wiki/GetSource

下载好之后,进行编译,可以参照如下教程

https://dev.openwrt.org.cn/wiki/howto

编译过程出现问题和解决方法记录如下:

error1:

In file includedfrom clean-temp.h:22:0,

from clean-temp.c:23:

./stdio.h:456:1:error: 'gets' undeclared here (not in a function)

_GL_WARN_ON_USE(gets, "gets is a security hole - use fgets instead");

解决方法:

参考链接:

http://www.civilnet.cn/talk/browse.php?topicno=78555,2楼.

 

找到:host-m4-1.4.15/lib/stdio.h,然后对stdio.h文件做出如下改动,必要时连同stdio.in.h一起修改:

<span style="font-family:Arial;font-size:12px;"># Begin patch
=== modified file 'grub-core/gnulib/stdio.in.h'
--- grub-core/gnulib/stdio.in.h	2010-09-20 10:35:33 +0000
+++ grub-core/gnulib/stdio.in.h	2012-07-04 15:18:15 +0000
@@ -140,8 +140,10 @@
 /* It is very rare that the developer ever has full control of stdin,
    so any use of gets warrants an unconditional warning.  Assume it is
    always declared, since it is required by C89.  */
+#if defined gets
 #undef gets
 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+#endif

error 2:

elf.cpp:68:5: error: '::close' has not been declared:

方法:
参考trunk的源码和此问题"https://dev.openwrt.org.cn/ticket/45"
修改 ./build_dir/host/mklibs/src/mklibs-readelf/elf.cpp,添加如下语句

#include <unistd.h> 

转载于:https://www.cnblogs.com/jetli-/p/5426250.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值