Use modern POSIX functions