64位centos上rsync源码编译时报错未知类型int32

liuxiao 2022-01-22 12:27:31

在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)];
 

...全文
245 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
无聊人士张 2022-03-04
  • 打赏
  • 举报
回复

大佬解决了吗?

23,216

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 应用程序开发区
社区管理员
  • 应用程序开发区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧