diff --git a/appl/ftp/ftp/ftp.c b/appl/ftp/ftp/ftp.c index 2fcb5ea2d..2a683b7db 100644 --- a/appl/ftp/ftp/ftp.c +++ b/appl/ftp/ftp/ftp.c @@ -64,7 +64,11 @@ hookup(char *host, int port) } else { hp = gethostbyname(host); if (hp == NULL) { +#ifdef __CYGWIN32__ + warnx("%s: %s", host, "unknown error"); +#else warnx("%s: %s", host, hstrerror(h_errno)); +#endif code = -1; return NULL; } diff --git a/appl/telnet/telnet/commands.c b/appl/telnet/telnet/commands.c index daab6184a..5c7d012f8 100644 --- a/appl/telnet/telnet/commands.c +++ b/appl/telnet/telnet/commands.c @@ -2213,7 +2213,11 @@ tn(int argc, char **argv) srp = 0; temp = sourceroute(hostp, &srp, &srlen); if (temp == 0) { +#ifdef __CYGWIN32__ + fprintf (stderr, "%s: %s\n", srp ? srp : "", "unknown error"); +#else fprintf (stderr, "%s: %s\n", srp ? srp : "", hstrerror(h_errno)); +#endif setuid(getuid()); return 0; } else if (temp == -1) { @@ -2247,8 +2251,13 @@ tn(int argc, char **argv) _hostname[sizeof(_hostname)-1] = '\0'; hostname = _hostname; } else { +#ifdef __CYGWIN32__ + fprintf (stderr, "%s: %s\n", hostp ? hostp : "", + "unknown error"); +#else fprintf (stderr, "%s: %s\n", hostp ? hostp : "", hstrerror(h_errno)); +#endif setuid(getuid()); return 0; }