Hello.
So far I have successfully built Dovecot until v2.3.14 on Centos 4-6 (yes I know, they are old, but as they are remote servers, distros can't upgraded), and sometimes I have also met compilation issues, but after highlighting them, Timo have fixed the code.
Found from similar thread (Dovecot 2.3.15 compilation fails https://dovecot.org/list/dovecot/2021-June/122412.html ) that new GCC is needed. However I can't find such requirement in v2.3.15 change log.
As seems that I'm not the only one with compilation issues, then @Timo - can You please fix the code so that also v2.3.15 can compiled on older distros?