zookeeper 3.3.3 C 编译的问题及解决

zookeeper 3.3.3 在Redhat 上编译时,会有下面的错误

 ../../../include/zookeeper/recordio.h:70: error:expected unqualified-id before ‘__extension__’
../../../include/zookeeper/recordio.h:70: error:expected `)' before ‘__extension__’
../../.. /include/zookeeper/recordio.h:70: error:expected unqualified-id before ‘)’ token
 

当把zookeeper.h 放到include第一位就不会有这个问题,显然这不是一个好的解决办法.

经检查,发现recordio.h中定义的

int64_t htonll(int64_t v);


在其它的头文件中可能会被定义成宏

 

所以做如下修改:

#ifndef htonll
int64_t htonll(int64_t v);
#endif


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值