linux配置内核支持netlink,Linux:编译安装keepalive:/usr/include/netlink/netlink-kernel.h:193:2: error: unknown t...

在尝试编译Keepalived 2.1.5的过程中,遇到了一些编译错误。首先是警告信息,包括关于signed overflow的假设、结构体声明的范围问题以及初始化错误。接着在编译namespaces.o文件时,遇到了未知类型名称的错误,导致编译失败。这可能涉及到netlink相关的头文件和结构体定义问题。
摘要由CSDN通过智能技术生成

[root@mysql2 keepalived-2.1.5]# make

过多的输出,...

main.c:917:8: warning: assuming signed overflow does not occur when simplifying conditional to constant [-Wstrict-overflow]

while (wait_count) {

^

CC daemon.o

CC pidfile.o

CC layer4.o

CC smtp.o

CC global_data.o

CC global_parser.o

In file included from global_parser.c:56:0:

../../keepalived/include/namespaces.h:42:49: warning: ‘struct nl_sock’ declared inside parameter list [enabled by default]

extern int nl_ipvs_connect(const char *, struct nl_sock *);

^

../../keepalived/include/namespaces.h:42:49: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

CC keepalived_netlink.o

keepalived_netlink.c: In function ‘netlink_request’:

keepalived_netlink.c:1488:2: warning: missing initializer for field ‘nlmsg_flag’ of ‘struct nlmsghdr’ [-Wmissing-field-initializers]

} req = { .nlh.nlmsg_type = type };

^

In file included from /usr/include/linux/rtnetlink.h:5:0,

from /usr/include/linux/fib_rules.h:5,

from keepalived_netlink.c:39:

/usr/include/linux/netlink.h:45:9: note: ‘nlmsg_flags’ declared here

__u16 nlmsg_flags; /* Additional flags */

^

CC namespaces.o

In file included from /usr/include/netlink/handlers.h:19:0,

from /usr/include/netlink/socket.h:16,

from namespaces.c:171:

/usr/include/netlink/netlink-kernel.h:193:2: error: unknown type name ‘__u32’

__u32 group;

^

make[2]: *** [namespaces.o] Error 1

make[2]: Leaving directory `/software/keepalived-2.1.5/keepalived/core'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/software/keepalived-2.1.5/keepalived'

make: *** [all-recursive] Error 1

[root@mysql2 keepalived-2.1.5]#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值