Check for the existence of the O_DSYNC flag, fall back to O_SYNC, or output an error if neither is available.