aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/fstream/unix/ostream.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/fstream/unix/ostream.c b/lib/fstream/unix/ostream.c
index 84a5725..17f1998 100644
--- a/lib/fstream/unix/ostream.c
+++ b/lib/fstream/unix/ostream.c
@@ -74,8 +74,11 @@ static int file_flush(ostream_t *strm)
goto fail;
}
- if (fsync(file->fd) != 0)
+ if (fsync(file->fd) != 0) {
+ if (errno == EINVAL)
+ return 0;
goto fail;
+ }
return 0;
fail: