* 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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user