OSDN Git Service

* io/unix.c: Add O_RDWR to open() call.
[pf3gnuchains/gcc-fork.git] / libgfortran / io / unix.c
index b35182d..56df254 100644 (file)
@@ -998,7 +998,7 @@ tempfile (void)
 
   if (mktemp (template))
     do
-      fd = open (template, O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
+      fd = open (template, O_RDWR |O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
     while (!(fd == -1 && errno == EEXIST) && mktemp (template));
   else
     fd = -1;