diff --git a/src/io/SDL_iostream.c b/src/io/SDL_iostream.c index 4da1c0460e..d85c5777c9 100644 --- a/src/io/SDL_iostream.c +++ b/src/io/SDL_iostream.c @@ -502,7 +502,7 @@ static bool SDLCALL fd_flush(void *userdata, SDL_IOStatus *status) result = SDL_fdatasync(iodata->fd); } while (result < 0 && errno == EINTR); - if (result < 0) { + if (result < 0 && errno != EINVAL) { return SDL_SetError("Error flushing datastream: %s", strerror(errno)); } return true;