mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-14 10:17:54 +00:00
Clarify why we ignore EINVAL when flushing a file descriptor
(cherry picked from commit a1d3fc1f50)
This commit is contained in:
parent
7af36d6c40
commit
e7a1ae0ea5
1 changed files with 1 additions and 0 deletions
|
|
@ -455,6 +455,7 @@ static bool SDLCALL fd_flush(void *userdata, SDL_IOStatus *status)
|
|||
result = SDL_fdatasync(iodata->fd);
|
||||
} while (result < 0 && errno == EINTR);
|
||||
|
||||
// We get EINVAL when flushing a pipe, just make that a no-op
|
||||
if (result < 0 && errno != EINVAL) {
|
||||
return SDL_SetError("Error flushing datastream: %s", strerror(errno));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue