X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/c8dfff332831bd68b431027070c66044b990898d..f8f89bae5e11c9c8e1895f0b62b0bdf80a5539fc:/canohost.c diff --git a/canohost.c b/canohost.c index da5131de..8270500d 100644 --- a/canohost.c +++ b/canohost.c @@ -1,4 +1,4 @@ -/* $OpenBSD: canohost.c,v 1.57 2006/07/12 22:28:51 stevesk Exp $ */ +/* $OpenBSD: canohost.c,v 1.62 2007/12/27 14:22:08 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -18,17 +18,21 @@ #include #include +#include #include #include -#if defined(HAVE_NETDB_H) -# include -#endif +#include +#include +#include +#include +#include -#include "packet.h" #include "xmalloc.h" +#include "packet.h" #include "log.h" #include "canohost.h" +#include "misc.h" static void check_ip_options(int, char *); @@ -268,7 +272,7 @@ get_socket_address(int sock, int remote, int flags) if ((r = getnameinfo((struct sockaddr *)&addr, addrlen, ntop, sizeof(ntop), NULL, 0, flags)) != 0) { error("get_socket_address: getnameinfo %d failed: %s", flags, - r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r)); + ssh_gai_strerror(r)); return NULL; } return xstrdup(ntop); @@ -369,7 +373,7 @@ get_sock_port(int sock, int local) if ((r = getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0, strport, sizeof(strport), NI_NUMERICSERV)) != 0) fatal("get_sock_port: getnameinfo NI_NUMERICSERV failed: %s", - r == EAI_SYSTEM ? strerror(errno) : gai_strerror(r)); + ssh_gai_strerror(r)); return atoi(strport); }