summaryrefslogtreecommitdiff
path: root/src/tools/db-convert.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/db-convert.c')
-rw-r--r--src/tools/db-convert.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/tools/db-convert.c b/src/tools/db-convert.c
index d61e9c417..7093f2960 100644
--- a/src/tools/db-convert.c
+++ b/src/tools/db-convert.c
@@ -27,6 +27,7 @@
#else
#include "sysconf.h"
#include <windows.h>
+#include <io.h>
#endif
#include <string>
@@ -1079,7 +1080,7 @@ dbFILE *open_db_write(const char *service, const char *filename, int version)
#ifndef _WIN32
fd = open(filename, O_WRONLY | O_CREAT | O_EXCL, 0666);
#else
- fd = open(filename, O_WRONLY | O_CREAT | O_EXCL | _O_BINARY, 0666);
+ fd = _open(filename, O_WRONLY | O_CREAT | O_EXCL | _O_BINARY, 0666);
#endif
f->fp = fdopen(fd, "wb"); /* will fail and return NULL if fd < 0 */
if (!f->fp || !write_file_version(f, version)) {