From: David Dykstra Date: Tue, 24 Nov 1998 19:10:21 +0000 (+0000) Subject: Always add the O_BINARY flag in do_open if it is defined, for Windows. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/a926daecbf3b31efb68e309e9d522a4fd01691f2 Always add the O_BINARY flag in do_open if it is defined, for Windows. Suggestion from Mart.Laak@hansa.ee --- diff --git a/syscall.c b/syscall.c index 16d0a964..558fe98d 100644 --- a/syscall.c +++ b/syscall.c @@ -76,6 +76,10 @@ int do_rmdir(char *pathname) int do_open(char *pathname, int flags, mode_t mode) { if (dry_run) return -1; +#ifdef O_BINARY + /* for Windows */ + flags |= O_BINARY; +#endif CHECK_RO return open(pathname, flags, mode); }