posix: avoid a potential buffer overflow in syslog
which: make sure errno is defined
posix: fix up newlib.h to cater for the new build system