X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/65172fff5df66faeba7b7badbfcf7c455f901c6e..bb4626fecfb390e58572a313461bdc1e8b78306b:/misc.c diff --git a/misc.c b/misc.c index 625a3436..2ca0414d 100644 --- a/misc.c +++ b/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.65 2006/11/23 01:35:11 ray Exp $ */ +/* $OpenBSD: misc.c,v 1.66 2007/12/27 14:22:08 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2005,2006 Damien Miller. All rights reserved. @@ -42,6 +42,7 @@ #include #include +#include #ifdef HAVE_PATHS_H # include #include @@ -120,6 +121,14 @@ unset_nonblock(int fd) return (0); } +const char * +ssh_gai_strerror(int gaierr) +{ + if (gaierr == EAI_SYSTEM) + return strerror(errno); + return gai_strerror(gaierr); +} + /* disable nagle on socket */ void set_nodelay(int fd)