Patch from Paul Green <Paul.Green@stratus.com> to be more POSIX-compatible