extern int errno; is incorrect these days. Include <errno.h> for the correct behaviour. This fixes the build on some configurations. Approved by: portmgr (build fix blanket)