Fix HAVE_UNISTD_H warning and error log priority.