configure checks for <error.h> but does not use this information to decide whether to include <error.h> or not. Causes build failure on musl libc based systems (http://musl-libc.org).
Actually including <error.h> is completely unnecessary: The error_* functions are not used. (The code indicates that they had been used at some point (before hunspell forked from myspell) but have then been converted to fprintf(stderr, ...) for portability.)
Also errno or the errno constants are not used so <errno.h> is also unnecessary.
<sys/mman.h> contains things like mmap but is also not used in the source. (I think this had also been converted to use fgets.)
So all of these can be removed. (That's also why it builds fine for android.)
Actually including <error.h> is completely unnecessary: The error_* functions are not used. (The code indicates that they had been used at some point (before hunspell forked from myspell) but have then been converted to fprintf(stderr, ...) for portability.)
Also errno or the errno constants are not used so <errno.h> is also unnecessary.
<sys/mman.h>
contains things like mmap but is also not used in the source. (I think this had also been converted to use fgets.)So all of these can be removed. (That's also why it builds fine for android.)
Thanks, pulled.