Backport sdl rw ops