strongSwan 编译错误

2015-09-02 18:56:08 +08:00
 Love4Taylor
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../../.. -I../../../../src/include -I../../../../src/libstrongswan -I../../../../src/libhydra -DROUTING_TABLE=220 -DROUTING_TABLE_PRIO=220 -rdynamic -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /root/strongswan-5.3.3rc2/config.h -MT kernel_netlink_ipsec.lo -MD -MP -MF .deps/kernel_netlink_ipsec.Tpo -c kernel_netlink_ipsec.c -fPIC -DPIC -o .libs/kernel_netlink_ipsec.o
In file included from kernel_netlink_ipsec.c:25:
../../../../src/include/linux/netlink.h:36: error: expected specifier-qualifier-list before '__kernel_sa_family_t'
In file included from kernel_netlink_ipsec.c:26:
../../../../src/include/linux/rtnetlink.h:357: error: expected specifier-qualifier-list before '__kernel_sa_family_t'
kernel_netlink_ipsec.c: In function 'receive_events':
kernel_netlink_ipsec.c:1036: error: 'struct sockaddr_nl' has no member named 'nl_pid'
kernel_netlink_ipsec.c: In function 'kernel_netlink_ipsec_create':
kernel_netlink_ipsec.c:2956: error: 'struct sockaddr_nl' has no member named 'nl_family'
kernel_netlink_ipsec.c:2966: error: 'struct sockaddr_nl' has no member named 'nl_groups'
make[4]: *** [kernel_netlink_ipsec.lo] Error 1
6013 次点击
所在节点    问与答
3 条回复
lichenbo
2015-09-09 07:05:28 +08:00
同遇到此问题
lichenbo
2015-09-09 07:50:18 +08:00
根据提示,我打开了那个 netlink.h ,在最前面加入 typedef unsigned int __kernel_sa_family_t; 后,就可以编译成功了
Love4Taylor
2015-09-09 08:37:17 +08:00
@lichenbo 我是 centos 6.7 出的问题,结果换 ubuntu 14.10 解决了 噗

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/217923

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX