diff options
Diffstat (limited to 'gdb/ser-tcp.c')
-rw-r--r-- | gdb/ser-tcp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index fe5cb44..9a868e8 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -63,6 +63,9 @@ tcp_open (struct serial *scb, const char *name) hostname[tmp] = '\000'; /* Tie off host name */ port = atoi (port_str + 1); + if (!hostname[0]) + strcpy (hostname, "localhost"); + hostent = gethostbyname (hostname); if (!hostent) |