diff options
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r-- | gdb/ser-tcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 75c8b76..f40bfce 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -24,6 +24,7 @@ #include "gdbcmd.h" #include "cli/cli-decode.h" #include "cli/cli-setshow.h" +#include "filestuff.h" #include <sys/types.h> @@ -207,9 +208,9 @@ net_open (struct serial *scb, const char *name) retry: if (use_udp) - scb->fd = socket (PF_INET, SOCK_DGRAM, 0); + scb->fd = gdb_socket_cloexec (PF_INET, SOCK_DGRAM, 0); else - scb->fd = socket (PF_INET, SOCK_STREAM, 0); + scb->fd = gdb_socket_cloexec (PF_INET, SOCK_STREAM, 0); if (scb->fd == -1) return -1; |