diff options
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/db-convert.c | 3 | ||||
| -rw-r--r-- | src/tools/db-merger.c | 2 |
2 files changed, 4 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)) { diff --git a/src/tools/db-merger.c b/src/tools/db-merger.c index c141e8382..81d03bba8 100644 --- a/src/tools/db-merger.c +++ b/src/tools/db-merger.c @@ -57,6 +57,8 @@ #else #include "sysconf.h" #include <windows.h> +#include <io.h> +#define open _open #endif /* Some SUN fixs */ |
