From 6f5f5aa3846525e47938e9caa8b6c65451ddf9d7 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 18 Apr 2004 10:21:31 +0000 Subject: [PATCH] fixed O_BINARY git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@242 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_restore.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rrd_restore.c b/src/rrd_restore.c index 61b82c1..89f34c2 100644 --- a/src/rrd_restore.c +++ b/src/rrd_restore.c @@ -415,7 +415,11 @@ rrd_write(char *file_name, rrd_t *rrd, char force_overwrite) if (strcmp("-",file_name)==0){ rrd_file= stdout; } else { - fdflags = O_WRONLY|O_CREAT|O_BINARY|O_EXCL; +#ifdef WIN32 + fdflags = O_RDWR|O_BINARY|O_CREAT|O_EXCL; +#else + fdflags = O_WRONLY|O_CREAT|O_EXCL; +#endif if (force_overwrite == 0) { fdflags |= O_EXCL; } -- 2.30.2