diff options
Diffstat (limited to 'sysdeps/mach/hurd/fdatasync.c')
-rw-r--r-- | sysdeps/mach/hurd/fdatasync.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/fdatasync.c b/sysdeps/mach/hurd/fdatasync.c index 19d7a4a58a..22c1d103d4 100644 --- a/sysdeps/mach/hurd/fdatasync.c +++ b/sysdeps/mach/hurd/fdatasync.c @@ -26,6 +26,12 @@ fdatasync (int fd) { error_t err = HURD_DPORT_USE (fd, __file_sync (port, 1, 1)); if (err) - return __hurd_dfail (fd, err); + { + if (err == EOPNOTSUPP) + /* If the file descriptor does not support sync, return EINVAL + as POSIX specifies. */ + err = EINVAL; + return __hurd_dfail (fd, err); + } return 0; } |