1 diff -u telnet/commands.c telnet.new/commands.c
2 --- telnet/commands.c Sat Sep 1 12:55:18 2001
3 +++ telnet.new/commands.c Sat Sep 1 12:54:36 2001
5 hints.ai_flags = AI_CANONNAME;
9 } else if (*portp == '-') {
14 warn("%s: %s", aliasp, gai_strerror(error));
19 if (bind(net, ares->ai_addr, ares->ai_addrlen) < 0) {
21 perror("setsockopt (IP_OPTIONS)");
23 #if defined(IPPROTO_IP) && defined(IP_TOS)
25 + if (res->ai_family == AF_INET) {
26 # if defined(HAS_GETTOS)
28 if (tos < 0 && (tp = gettosbyname("telnet", "tcp")))
30 char hbuf[NI_MAXHOST];
32 if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf),
33 - NULL, 0, NI_NUMERICHOST) != 0) {
34 + NULL, 0, niflags) != 0) {
35 strcpy(hbuf, "(invalid)");
37 fprintf(stderr, "telnet: connect to address %s: %s\n", hbuf,