Posix warnings fixes