- 论坛徽章:
- 0
|
编译pureftp在64位的操作系统(CentOS5.2)下出错
puredb_read.c:109:警告:由于数据类型范围限制,比较结果永远为假
虽然是警告,但是确实不能用了,所以连接到mysql的认证返回都是错误。
文件中的方法如下:
(是这句(db->size = (puredb_u32_t) st.st_size) > (size_t) 0xffffffff ||出错)
int puredb_open(PureDB * const db, const char *dbfile)
{
struct stat st;
db->map = NULL;
if ((db->fd = open(dbfile, O_RDONLY | O_BINARY)) == -1) {
return -1;
}
if (fstat(db->fd, &st) < 0 ||
(db->size = (puredb_u32_t) st.st_size) > (size_t) 0xffffffff ||
db->size < ((size_t) (256U + 1U) * sizeof(puredb_u32_t) +
sizeof PUREDB_VERSION - (size_t) 1U)) {
close(db->fd);
return -2;
}
改怎样修改呢,谢谢C版的朋友! |
|