Code changes to stop using POSIX library