Fix: logging: Illumos/Solaris do not define some error codes
Refactor: cib: Illumos/Solaris don't have the type in dirent, stat() is more portable