posix_api: Turn posix check into function call.