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,



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章