dhcpcd-6.4.3移植记录

下载:http://roy.marples.name/downloads/dhcpcd/

我下载的是dhcpcd-6.4.3

解压后进入目录,执行

./configure --disable-debug \
--enable-fork \
--disable-ipv6 \
--disable-inet6 \
--enable-embedded \
--prefix=./install \
--host=powerpc-linux

然后make;make install

注1:上面powerpc-linux已经做过连接为powerpc-e300c3-linux-gnu-gcc:
     ln -s powerpc-e300c3-linux-gnu-gcc powerpc-linux-gcc
注2:如果要静态编译可以添加--enable-static 这些选项都可以通过vi configure来查看


要修改的地方:
①修改 Makefile 中CSTD?=     c99 为gnu99
②编译中发现linux/ipv6.h 中有结构体in6_pktinfo重复定义,通过查找发现与netinet/in.h中的定义重复
参照主机中的netinet/in.h,修改编译器的in.h 把#ifdef __USE_GNU 移动到结构体in6_pktinfo定义之上问题解决。


468 
469 #ifdef __USE_GNU
470 /* IPv6 packet information.  */
471 struct in6_pktinfo
472   {
473     struct in6_addr ipi6_addr;  /* src/dst IPv6 address */
474     unsigned int ipi6_ifindex;  /* send/recv interface index */
475   };
476 
477 /* IPv6 MTU information.  */
478 struct ip6_mtuinfo
479   {
480     struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
481     uint32_t ip6m_mtu;         /* path MTU in host byte order */
482   };
483 
484 
485 /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292).  */
486 extern int inet6_option_space (int __nbytes)
487      __THROW __attribute_deprecated__;
488 extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
489                   int __type) __THROW __attribute_deprecated__;
490 extern int inet6_option_append (struct cmsghdr *__cmsg,



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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值