summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
authorDavid Dykstra <dwd@samba.org>1998-11-24 19:10:21 +0000
committerDavid Dykstra <dwd@samba.org>1998-11-24 19:10:21 +0000
commita926daecbf3b31efb68e309e9d522a4fd01691f2 (patch)
tree933ca0ec2b7f95fcc0be2726bc7f803a44c552dc /syscall.c
parent53dd3135f13728fbcfce4c85773d9fc97cfce714 (diff)
downloadrsync-a926daecbf3b31efb68e309e9d522a4fd01691f2.tar.gz
Always add the O_BINARY flag in do_open if it is defined, for Windows.
Suggestion from Mart.Laak@hansa.ee
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c4
1 files changed, 4 insertions, 0 deletions
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);
}