diff options
author | Carlos Santos <casantos@datacom.com.br> | 2018-10-29 01:17:38 -0300 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2018-11-01 04:43:32 +0100 |
commit | 89addcbf98e0962db08d36b3a958aacb94817266 (patch) | |
tree | dbb53b2454f1369559f326f4540559b5024a12a3 /libc/stdlib | |
parent | 447f72b8efa34b20e24d609d94ff2adc922a7ae9 (diff) |
mkostemp64: clear flags, as mkostemp does
This should have been made in commit 9649721950 but was forgotten.
Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Diffstat (limited to 'libc/stdlib')
-rw-r--r-- | libc/stdlib/mkostemp64.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/stdlib/mkostemp64.c b/libc/stdlib/mkostemp64.c index aa9736cd6..f4674bb0c 100644 --- a/libc/stdlib/mkostemp64.c +++ b/libc/stdlib/mkostemp64.c @@ -15,9 +15,9 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <fcntl.h> #include <stdio.h> #include <stdlib.h> +#include <fcntl.h> #include "../misc/internals/tempname.h" /* Generate a unique temporary file name from TEMPLATE. @@ -27,6 +27,7 @@ int mkostemp64 (char *template, int flags) { + flags -= flags & O_ACCMODE; /* Remove O_RDONLY, O_WRONLY, and O_RDWR. */ return __gen_tempname (template, __GT_BIGFILE, flags | O_LARGEFILE, 0, S_IRUSR | S_IWUSR); } |