Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index f9b317c0d..eaf6eb870 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -1076,7 +1076,10 @@ cygwin_gethostname (char *name, size_t len)
if (!GetComputerNameExA (ComputerNameDnsFullyQualified, name,
&local_len))
{
- set_winsock_errno ();
+ if (GetLastError () == ERROR_MORE_DATA)
+ set_errno (ENAMETOOLONG);
+ else
+ set_winsock_errno ();
__leave;
}
}