On 12 Jul 2016, at 02:16, Joseph Tam jtam.home@gmail.com wrote:
Aki Tuomi wrote:
Well, tried with or without patches, but got still same error:
sha1.h:80: error: static or type qualifiers in abstract declarator
For what it's worth, I get the same error compiling on Solaris 10. It may be because I have a rather old gcc (3.4.4). Editing out the "static" keyword from config.h allowed it to finish the compile.
It still happened even with https://github.com/dovecot/core/commit/d9c865ce774aae9f2f17b89e7e94c3cfca29d...
You need to rerun autotools on this before it can do anything.
I don't grok autotools, but I don't think this will solve the problem. If I understand the patch correctly, it modifies the small program used by configure to test a C99 feature.
Manually compiling the small test program (with and without the changes made by the patch) will result in a successful compile, but if you compile sha1.h (line 80,81), it will fail.
I've reduced the problem to this:
void foo(int X[static 20]);
will compile but if you remove "X", it won't.
The change was to replace "int" with "unsigned char" in the above test program, and the test started failing then in CentOS 5's gcc. I'd expect the same to happen for you also.