Qmail的Maildir++补丁的小错误

| |
[不指定 2006/12/25 22:18 | by ipaddr ]
好久没有用过qmail了,近日安装一台qmail邮件服务器,在一阵Patch,make setup check后出错,编译不通过!提示如下:

[code]
overmaildirquota.c:32: warning: data definition has no type or storage class
overmaildirquota.c:33: error: parse error before '}' token
overmaildirquota.c:36: error: redefinition of `ret_value'
overmaildirquota.c:32: error: `ret_value' previously defined here
overmaildirquota.c:36: warning: data definition has no type or storage class
overmaildirquota.c:37: error: parse error before '}' token
make: *** [overmaildirquota.o] Error 1
[/code]

语法错误,这问题有点奇怪,之前用Redhat9安装,没出现过此类问题.

网上搜了一下,发现原来是某些gcc加强了语法的检测,以前允许定义字符串常量跨行,现在跨行的话,必须使用\,

而在Maildir++的补丁的overmaildirquota.c里面,有这么一行:

[code]

static const char rcsid[]="$Id: overquota.c,v 1.0 2002/06/09 16:21:05 mr
sam Exp $";

[/code]

在mr后面就换行了,CentOS4.4的gcc 编译不通过,

你需要改成:

[code]

static const char rcsid[]="$Id: overquota.c,v 1.0 2002/06/09 16:21:05 mrsam_patchByIpaddr Exp $";

[/code]

(删除后面的回车,将字符串常量改成一行即可.)

再次编译通过.
Net | 评论(0) | 引用(26) | 阅读(4457)