diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-11-25 10:53:51 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-01-07 14:00:18 +0100 |
commit | 88148be57836a3c1609f06536348d25a888bb053 (patch) | |
tree | 50fa975e21cb954c9ee68c69691b94349138697b | |
parent | b7af06c2ee526cc63f3722b0a628ad9a04740562 (diff) | |
download | gnutls-88148be57836a3c1609f06536348d25a888bb053.tar.gz |
libopts: use the O_BINARY flag in windows for files
-rw-r--r-- | src/libopts/text_mmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libopts/text_mmap.c b/src/libopts/text_mmap.c index 07c0bf10eb..d5e074fa97 100644 --- a/src/libopts/text_mmap.c +++ b/src/libopts/text_mmap.c @@ -186,7 +186,9 @@ validate_mmap(char const * fname, int prot, int flags, tmap_info_t * mapinfo) * write access. */ int o_flag = FILE_WRITABLE(prot, flags) ? O_RDWR : O_RDONLY; - +#ifdef _WIN32 + o_flag |= O_BINARY; +#endif /* * If you're not sharing the file and you are writing to it, * then don't let anyone else have access to the file. |