Commit 7ad88eff authored by Victor Zverovich's avatar Victor Zverovich

Fix a warning.

parent 11b3b512
......@@ -43,11 +43,15 @@
#endif
#if FMT_USE_DUP
# include <sys/types.h>
# include <sys/stat.h>
# include <fcntl.h>
# ifdef _WIN32
# include <io.h>
# define O_WRONLY _O_WRONLY
# define O_CREAT _O_CREAT
# define O_TRUNC _O_TRUNC
......@@ -57,6 +61,13 @@
# define close _close
# define dup _dup
# define dup2 _dup2
namespace {
int open(const char *path, int oflag, int pmode) {
_sopen_s(fd, path, oflag, _SH_DENYNO, pmode);
return fd;
}
}
# else
# include <unistd.h>
# endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment