Merge remote-tracking branch 'qubesos/pr/14'

* qubesos/pr/14:
  Fall back to sync() if syncfs() is unavailable
This commit is contained in:
Marek Marczykowski-Górecki 2017-07-04 13:29:13 +02:00
commit 1b437e57d5
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -237,6 +237,8 @@ int do_unpack(void)
cwd_fd = open(".", O_RDONLY);
if (cwd_fd >= 0 && syncfs(cwd_fd) == 0 && close(cwd_fd) == 0)
errno = saved_errno;
#else
sync();
#endif
send_status_and_crc(errno, untrusted_namebuf);