aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 5a1af02..24b1fe6 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -68,6 +68,7 @@
#include "gdb_bfd.h"
#include "f-lang.h"
#include "source.h"
+#include "filestuff.h"
#include <fcntl.h>
#include "gdb_string.h"
@@ -20698,7 +20699,7 @@ write_psymtabs_to_index (struct objfile *objfile, const char *dir)
INDEX_SUFFIX, (char *) NULL);
cleanup = make_cleanup (xfree, filename);
- out_file = fopen (filename, "wb");
+ out_file = gdb_fopen_cloexec (filename, "wb");
if (!out_file)
error (_("Can't open `%s' for writing"), filename);