路由软件 zebra-0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)
2013-01-28 21:04
561 查看
感谢:http://siwind.iteye.com/blog/1160830,谢谢!
=============================================
1.问题现象
解压缩zebra-0.95a压缩包,编译,出现问题:
./configure
make
后出现:
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201608/70d1a2873003aa82ec6b24afeadf97ed.png)
rtadv.c: In function ‘rtadv_recv_packet’:
rtadv.c:123: error: dereferencing pointer to incomplete type
rtadv.c:124: error: dereferencing pointer to incomplete type
rtadv.c:124: error: dereferencing pointer to incomplete type
rtadv.c:130: warning: dereferencing type-punned pointer will break strict-aliasing rules
rtadv.c: In function ‘rtadv_send_packet’:
rtadv.c:149: error: invalid application of ‘sizeof’ to incomplete type ‘struct in6_pktinfo’
rtadv.c:194: warning: operation on ‘node’ may be undefined
rtadv.c:268: error: dereferencing pointer to incomplete type
rtadv.c:269: error: dereferencing pointer
2.解决
打开zebra-0.95a/lib/zebra.h文件,
定位到103行,添加如下内容,即可解决。
#ifdef GNU_LINUX
#define __USE_GNU
#endif
=========================
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201608/70d1a2873003aa82ec6b24afeadf97ed.png)
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif /* HAVE_SYS_SOCKIO_H */
/** Added ***/
#ifdef GNU_LINUX
#define __USE_GNU
#endif
/** end added **/
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif /* HAVE_NETINET_IN_H */
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
分享到:
=============================================
1.问题现象
解压缩zebra-0.95a压缩包,编译,出现问题:
./configure
make
后出现:
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201608/70d1a2873003aa82ec6b24afeadf97ed.png)
rtadv.c: In function ‘rtadv_recv_packet’:
rtadv.c:123: error: dereferencing pointer to incomplete type
rtadv.c:124: error: dereferencing pointer to incomplete type
rtadv.c:124: error: dereferencing pointer to incomplete type
rtadv.c:130: warning: dereferencing type-punned pointer will break strict-aliasing rules
rtadv.c: In function ‘rtadv_send_packet’:
rtadv.c:149: error: invalid application of ‘sizeof’ to incomplete type ‘struct in6_pktinfo’
rtadv.c:194: warning: operation on ‘node’ may be undefined
rtadv.c:268: error: dereferencing pointer to incomplete type
rtadv.c:269: error: dereferencing pointer
2.解决
打开zebra-0.95a/lib/zebra.h文件,
定位到103行,添加如下内容,即可解决。
#ifdef GNU_LINUX
#define __USE_GNU
#endif
=========================
Java代码
![](https://oscdn.geek-share.com/Uploads/Images/Content/201608/70d1a2873003aa82ec6b24afeadf97ed.png)
#ifdef HAVE_SYS_SOCKIO_H
#include <sys/sockio.h>
#endif /* HAVE_SYS_SOCKIO_H */
/** Added ***/
#ifdef GNU_LINUX
#define __USE_GNU
#endif
/** end added **/
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif /* HAVE_NETINET_IN_H */
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
分享到:
相关文章推荐
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决(error: dereferencing pointer to incomplete type)
- 在linux 下编译c程序时“ error:dereferencing pointer to incomplete type”的问题
- 路由软件 zebra-0.95a 在linux下面编译出现问题的解决
- 关于GCC编译C语言多文件出现类似dereferencing pointer to incomplete type ‘struct TreeNode’的问题
- Redhat编译php-5.2.9出现error dereferencing pointer to incomplete type
- gcc编译出现:error: dereferencing pointer to incomplete type
- gcc编译出现:error: dereferencing pointer to incomplete type
- error: dereferencing pointer to incomplete type的解决办法
- error: dereferencing pointer to incomplete type的解决办法
- php安装错误 (node.c:1953:error dereferencing pointer to incomplete type) 解决办法
- 解决编译错误:dereferencing pointer to incomplete type 的办法
- ERROR :“dereferencing pointer to incomplete type”是什么错误?
- ERROR_dereferencing pointer to incomplete type
- C语言 建立栈报错 error: dereferencing pointer to incomplete type
- 关于编译报错“dereferencing pointer to incomplete type...
- 关于编译报错“dereferencing pointer to incomplete type...
- linux下开发,解决cocos2d-x中编译出现的一个小问题, undefined reference to symbol 'pthread_create@@GLIBC_2.2.5'
- 程序编译是出现"field has incomplete type"问题的解决
- 关于编译报错“dereferencing pointer to incomplete type