summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--contrib/gdb/gdb/exec.c1
-rw-r--r--contrib/gdb/gdb/symfile.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/contrib/gdb/gdb/exec.c b/contrib/gdb/gdb/exec.c
index dc71a49..4d3a307 100644
--- a/contrib/gdb/gdb/exec.c
+++ b/contrib/gdb/gdb/exec.c
@@ -185,6 +185,7 @@ exec_file_command (args, from_tty)
&scratch_pathname);
if (scratch_chan < 0)
perror_with_name (filename);
+ fcntl (scratch_chan, F_SETFD, 1);
exec_bfd = bfd_fdopenr (scratch_pathname, gnutarget, scratch_chan);
if (!exec_bfd)
diff --git a/contrib/gdb/gdb/symfile.c b/contrib/gdb/gdb/symfile.c
index 62c4f61..4604678 100644
--- a/contrib/gdb/gdb/symfile.c
+++ b/contrib/gdb/gdb/symfile.c
@@ -820,6 +820,7 @@ symfile_bfd_open (name)
make_cleanup (free, name);
perror_with_name (name);
}
+ fcntl (desc, F_SETFD, 1);
free (name); /* Free 1st new malloc'd copy */
name = absolute_name; /* Keep 2nd malloc'd copy in bfd */
/* It'll be freed in free_objfile(). */
OpenPOWER on IntegriCloud