mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
sync: support syncing files on cygwin
* src/sync.c (sync_arg): Similarly to AIX, Cygwin 2.9.0 was seen to need write access to have permission to sync a file.
This commit is contained in:
1 parent
4f920e93ec
commit
6e9bf0765f
1 file changed
+2
-2
+2
-2
@@ -94,8 +94,8 @@ sync_arg (enum sync_mode mode, char const *file)
|
||||
int open_flags = O_RDONLY | O_NONBLOCK;
|
||||
int fd;
|
||||
|
||||
#ifdef _AIX
|
||||
/* AIX 7.1 fsync requires write access to file. */
|
||||
#if defined _AIX || defined __CYGWIN__
|
||||
/* AIX 7.1, CYGWIN 2.9.0, fsync requires write access to file. */
|
||||
if (mode == MODE_FILE)
|
||||
open_flags = O_WRONLY | O_NONBLOCK;
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user