V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
Love4Taylor
V2EX  ›  问与答

strongSwan 编译错误

  •  
  •   Love4Taylor · 2015-09-02 18:56:08 +08:00 · 5967 次点击
    这是一个创建于 3354 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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
    3 条回复    2015-09-09 08:37:17 +08:00
    lichenbo
        1
    lichenbo  
       2015-09-09 07:05:28 +08:00
    同遇到此问题
    lichenbo
        2
    lichenbo  
       2015-09-09 07:50:18 +08:00
    根据提示,我打开了那个 netlink.h ,在最前面加入 typedef unsigned int __kernel_sa_family_t; 后,就可以编译成功了
    Love4Taylor
        3
    Love4Taylor  
    OP
       2015-09-09 08:37:17 +08:00 via Android
    @lichenbo 我是 centos 6.7 出的问题,结果换 ubuntu 14.10 解决了 噗
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5328 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 03:44 · PVG 11:44 · LAX 19:44 · JFK 22:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.