* net.cc (cygwin_gethostname): Fix call to wsock function gethostname.

This commit is contained in:
Corinna Vinschen 2003-01-10 11:58:52 +00:00
parent e410614acf
commit a771176720
2 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2003-01-10 Corinna Vinschen <corinna@vinschen.de>
* net.cc (cygwin_gethostname): Fix call to wsock function gethostname.
2003-01-09 Christopher Faylor <cgf@redhat.com> 2003-01-09 Christopher Faylor <cgf@redhat.com>
* cygthread.cc (cygthread::cygthread): Be more noisy about odd * cygthread.cc (cygthread::cygthread): Be more noisy about odd

View File

@ -891,14 +891,12 @@ cygwin_getservbyport (int port, const char *proto)
extern "C" int extern "C" int
cygwin_gethostname (char *name, size_t len) cygwin_gethostname (char *name, size_t len)
{ {
int PASCAL win32_gethostname (char *, int);
sig_dispatch_pending (0); sig_dispatch_pending (0);
sigframe thisframe (mainthread); sigframe thisframe (mainthread);
if (__check_null_invalid_struct_errno (name, len)) if (__check_null_invalid_struct_errno (name, len))
return -1; return -1;
if (wsock32_handle == NULL || win32_gethostname (name, len) == SOCKET_ERROR) if (gethostname (name, len) == SOCKET_ERROR)
{ {
DWORD local_len = len; DWORD local_len = len;