liuxiao 2022-01-23 12:28 采纳率: 0%
浏览 132
已结题

64位centos7上rsync编译时报错未知类型int32,请教如何解决

64位centos7上rsync编译时报错未知类型int32,请教如何解决?打印信息如下:
/*In file included from ./rounding.c:20:0:
./rsync.h:576:3: 错误:#error Could not find a 32-bit integer variable

error Could not find a 32-bit integer variable

^
./rsync.h:645:2: 错误:未知的类型名‘int32’
int32 size, entries;
^
./rsync.h:646:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘node_size’
uint32 node_size;
^
./rsync.h:652:2: 错误:未知的类型名‘int32’
int32 key;
^
./rsync.h:732:3: 错误:#error Character pointers are not 4 or 8 bytes.

error Character pointers are not 4 or 8 bytes.

^
./rsync.h:736:2: 错误:未知的类型名‘int32’
int32 num;
^
./rsync.h:737:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘unum’
uint32 unum;
^
./rsync.h:753:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘len32’
uint32 len32; /* Lowest 32 bits of the file's length */
^
./rsync.h:895:2: 错误:未知的类型名‘int32’
int32 len; /< length of chunk of file */
^
./rsync.h:896:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘sum1’
uint32 sum1; /**< simple checksum */
^
./rsync.h:905:2: 错误:未知的类型名‘int32’
int32 count; /
< how many chunks */
^
./rsync.h:906:2: 错误:未知的类型名‘int32’
int32 blength; /**< block_length */
^
./rsync.h:907:2: 错误:未知的类型名‘int32’
int32 remainder; /**< flength % block_length /
^
./rsync.h:916:2: 错误:未知的类型名‘int32’
int32 p_size; /
Largest window size we allocated /
^
./rsync.h:917:2: 错误:未知的类型名‘int32’
int32 p_len; /
Latest (rounded) window size /
^
./rsync.h:918:2: 错误:未知的类型名‘int32’
int32 def_window_size; /
Default window size */
^
./rsync.h:954:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘rflags’
uint32 rflags;
^
In file included from ./rsync.h:1041:0,
from ./rounding.c:20:
./byteorder.h:76:1: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IVALu’
IVALu(const uchar *buf, int pos)
^
./byteorder.h:87:36: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘val’
SIVALu(uchar *buf, int pos, uint32 val)
^
./byteorder.h:122:1: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘IVAL’
IVAL(const char *buf, int pos)
^
./byteorder.h:128:34: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘val’
SIVAL(char *buf, int pos, uint32 val)
^
In file included from ./rsync.h:1042:0,
from ./rounding.c:20:
./lib/mdigest.h:10:9: 错误:expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘A’
uint32 A, B, C, D;
^
./lib/mdigest.h:17:60: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘length’
void mdfour_update(md_context *md, const uchar *in, uint32 length);
^
In file included from ./rsync.h:1101:0,
from ./rounding.c:20:
./proto.h:28:8: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘get_checksum1’
uint32 get_checksum1(char *buf1, int32 len);
^
./proto.h:29:31: 错误:未知的类型名‘int32’
void get_checksum2(char *buf, int32 len, char *sum);
^
./proto.h:32:32: 错误:未知的类型名‘int32’
void sum_update(const char *p, int32 len);
^
./proto.h:70:41: 错误:expected ‘;’, ‘,’ or ‘)’ before ‘rflags’
const filter_rule *rule_template(uint32 rflags);
^
./proto.h:82:48: 错误:未知的类型名‘int32’
struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
^
./proto.h:82:65: 错误:未知的类型名‘int32’
struct map_struct *map_file(int fd, OFF_T len, int32 read_size, int32 blk_size);
^
./proto.h:83:53: 错误:未知的类型名‘int32’
char *map_ptr(struct map_struct *map, OFF_T offset, int32 len);
^
./proto.h:110:20: 错误:未知的类型名‘int32’
stat_x *sxp, int32 iflags, uchar fnamecmp_type,
^
./proto.h:158:1: 错误:未知的类型名‘int32’
int32 read_int(int f);
^
./proto.h:159:1: 错误:未知的类型名‘int32’
int32 read_varint(int f);
^
./proto.h:170:23: 错误:未知的类型名‘int32’
void write_int(int f, int32 x);
^
./proto.h:171:26: 错误:未知的类型名‘int32’
void write_varint(int f, int32 x);
^
./proto.h:179:23: 错误:未知的类型名‘int32’
void write_ndx(int f, int32 ndx);
^
./proto.h:180:1: 错误:未知的类型名‘int32’
int32 read_ndx(int f);
^
./proto.h:295:24: 错误:未知的类型名‘int32’
void send_token(int f, int32 token, struct map_struct *buf, OFF_T offset,
^
./proto.h:296:3: 错误:未知的类型名‘int32’
int32 n, int32 toklen);
^
./proto.h:296:12: 错误:未知的类型名‘int32’
int32 n, int32 toklen);
^
./proto.h:297:1: 错误:未知的类型名‘int32’
int32 recv_token(int f, char **data);
^
./proto.h:298:28: 错误:未知的类型名‘int32’
void see_token(char *data, int32 toklen);
^
./proto.h:352:8: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘fuzzy_distance’
uint32 fuzzy_distance(const char *s1, unsigned len1, const char s2, unsigned len2);/
^
./rounding.c: 在函数‘main’中:
./rounding.c:35:13: 警告:变量‘test_array’被设定但未被使用 [-Wunused-but-set-variable]
static int test_array[1 - 2 * (ACTUAL_SIZE != EXPECTED_SIZE)];

  • 写回答

7条回答 默认 最新

  • dtsroy 2022-01-23 12:36
    关注
    获得0.30元问题酬金

    给它加个宏,手动在文件开头,块保护(即#ifndef/#define)后,加上一行类型定义
    #define int32 int
    预处理器就会将所有的int32替换成int,即32位整数

    评论

报告相同问题?

问题事件

  • 系统已结题 1月31日
  • 创建了问题 1月23日

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效