keepalived-1.2.2 编译出错问题解决

 今天在centos5.4 32位的系统上编译较新的keepalived包结果报错:

/usr/include/sys/types.h:235: error: conflicting types for ‘blkcnt_t’

/usr/src/linux/include/linux/types.h:142: error: previous declaration of ‘blkcnt_t’ was here

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

make[2]: Leaving directory `/root/keepalived-1.2.2/keepalived/libipvs-2.6'

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

make[1]: Leaving directory `/root/keepalived-1.2.2/keepalived'

make: *** [all] Error 2

解决方法如下:

vim keepalived/libipvs-2.6/ip_vs.h  

将#include <sys/types.h>放到#include <linux/types.h>的前面重新编译安装。

问题原因:循环引用问题。

你可能感兴趣的:(keepalived)