From dc8d11f52e5eda900c9b7dc06aab19567b1c9a50 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 10 Jan 2003 12:55:47 +0000 Subject: * autoload.cc (gethostname): Make call optional, return 1 if function can't get loaded. * net.cc (cygwin_gethostname): Call GetComputerName if return value of gethostname is non-zero. --- winsup/cygwin/net.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index b558ad78b..b55e439b4 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -896,7 +896,7 @@ cygwin_gethostname (char *name, size_t len) if (__check_null_invalid_struct_errno (name, len)) return -1; - if (gethostname (name, len) == SOCKET_ERROR) + if (gethostname (name, len)) { DWORD local_len = len; -- cgit v1.2.3