summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index e9ac04a21..017faa692 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -95,12 +95,12 @@ insert_file (char *name, char *&cmd)
PWCHAR wname = tp.w_get ();
sys_mbstowcs (wname, NT_MAX_PATH, name + 1);
f = CreateFileW (wname,
- GENERIC_READ, /* open for reading */
- FILE_SHARE_READ, /* share for reading */
- &sec_none_nih, /* default security */
- OPEN_EXISTING, /* existing file only */
- FILE_ATTRIBUTE_NORMAL,/* normal file */
- NULL); /* no attr. template */
+ GENERIC_READ, /* open for reading */
+ FILE_SHARE_VALID_FLAGS, /* share for reading */
+ &sec_none_nih, /* default security */
+ OPEN_EXISTING, /* existing file only */
+ FILE_ATTRIBUTE_NORMAL, /* normal file */
+ NULL); /* no attr. template */
if (f == INVALID_HANDLE_VALUE)
{