X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fser-tcp.c;h=bdfd55663b6569204499937aa0e041f3e3fb450f;hb=e98ee8c458f3a8405eb93e71b00f801b4bbe3635;hp=8f165bcf0b1c3a119070f381e2b8ba13c82ddbe1;hpb=c7ab0aef11d91b637bf091aa9176b8dc4aadee46;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 8f165bcf0b..bdfd55663b 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -171,7 +171,11 @@ try_connect (const struct addrinfo *ainfo, unsigned int *polls) return -1; /* Set socket nonblocking. */ +#ifdef USE_WIN32API + u_long ioarg = 1; +#else int ioarg = 1; +#endif ioctl (sock, FIONBIO, &ioarg); @@ -367,7 +371,7 @@ net_open (struct serial *scb, const char *name) ioctl (scb->fd, FIONBIO, &ioarg); - if (success_ainfo->ai_socktype == IPPROTO_TCP) + if (success_ainfo->ai_protocol == IPPROTO_TCP) { /* Disable Nagle algorithm. Needed in some cases. */ int tmp = 1;