diff options
Diffstat (limited to 'sysdeps/mach/hurd/fsync.c')
-rw-r--r-- | sysdeps/mach/hurd/fsync.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/fsync.c b/sysdeps/mach/hurd/fsync.c index a474c8a356..fe3e044a3a 100644 --- a/sysdeps/mach/hurd/fsync.c +++ b/sysdeps/mach/hurd/fsync.c @@ -27,6 +27,12 @@ fsync (fd) { error_t err = HURD_DPORT_USE (fd, __file_sync (port, 1, 0)); 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; } |