Missing ERRNO: add fix for FreeBSD too