zoukankan      html  css  js  c++  java
  • 路由软件 zebra0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)

    感谢:http://siwind.iteye.com/blog/1160830,谢谢!
    =============================================
    1.问题现象 
    解压缩zebra-0.95a压缩包,编译,出现问题: 
    ./configure 
    make 

    后出现: 

    Java代码  收藏代码
    1. rtadv.c: In function ‘rtadv_recv_packet’:  
    2. rtadv.c:123: error: dereferencing pointer to incomplete type  
    3. rtadv.c:124: error: dereferencing pointer to incomplete type  
    4. rtadv.c:124: error: dereferencing pointer to incomplete type  
    5. rtadv.c:130: warning: dereferencing type-punned pointer will break strict-aliasing rules  
    6. rtadv.c: In function ‘rtadv_send_packet’:  
    7. rtadv.c:149: error: invalid application of ‘sizeof’ to incomplete type ‘struct in6_pktinfo’   
    8. rtadv.c:194: warning: operation on ‘node’ may be undefined  
    9. rtadv.c:268: error: dereferencing pointer to incomplete type  
    10. rtadv.c:269: error: dereferencing pointer   



    2.解决 
    打开zebra-0.95a/lib/zebra.h文件, 
    定位到103行,添加如下内容,即可解决。 

    #ifdef GNU_LINUX 
    #define  __USE_GNU 
    #endif
     
    ========================= 

    Java代码  收藏代码
    1. #ifdef HAVE_SYS_SOCKIO_H  
    2. #include <sys/sockio.h>  
    3. #endif /* HAVE_SYS_SOCKIO_H */  
    4.   
    5. /** Added ***/  
    6. #ifdef GNU_LINUX  
    7. #define  __USE_GNU  
    8. #endif  
    9. /**   end added **/  
    10.   
    11. #ifdef HAVE_NETINET_IN_H  
    12. #include <netinet/in.h>  
    13. #endif /* HAVE_NETINET_IN_H */  
    14. #include <netinet/in_systm.h>  
    15. #include <netinet/ip.h>  
    16. #include <netinet/tcp.h>  
    Meet so Meet. C plusplus I-PLUS....
  • 相关阅读:
    [CQOI2006]凸多边形
    NOIP后省选集训前文化课划水记
    FFT字符串匹配
    ghj1222的代码规范
    博弈论
    P1350 车的放置
    P2110 欢总喊楼记
    虫食算
    3192: [JLOI2013]删除物品
    逛公园
  • 原文地址:https://www.cnblogs.com/iplus/p/4467340.html
Copyright © 2011-2022 走看看