From 747f31854a572b3dd64912997dde2dc984b1f2d8 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Tue, 26 Sep 2017 20:36:35 -0500 Subject: cygwin: fix gethostbyaddr argument types The first argument of gethostbyaddr needs to accept a generic pointer to be compatible with e.g. struct in_addr *. This caused an issue compiling krb5-1.15. Signed-off-by: Yaakov Selkowitz --- winsup/cygwin/net.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/net.cc') diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index fd903b112..8969e7c6f 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -1152,13 +1152,13 @@ cygwin_gethostbyname (const char *name) /* exported as gethostbyaddr: standards? */ extern "C" struct hostent * -cygwin_gethostbyaddr (const char *addr, int len, int type) +cygwin_gethostbyaddr (const void *addr, socklen_t len, int type) { hostent *res = NULL; __try { - res = dup_ent (gethostbyaddr (addr, len, type)); + res = dup_ent (gethostbyaddr ((const char *) addr, len, type)); if (res) debug_printf ("h_name %s", res->h_name); else -- cgit v1.2.3