]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Fix Get_error usage
authorBernd Kuhls <bernd.kuhls@t-online.de>
Wed, 13 Sep 2017 12:07:11 +0000 (14:07 +0200)
committerBernd Kuhls <bernd.kuhls@t-online.de>
Wed, 13 Sep 2017 12:07:11 +0000 (14:07 +0200)
The usage of Get_Error is guarded by "ifdef h_errno" in this file, the
definition of this function should follow the same rules.

Fixes a build error when cross-compiling:
https://github.com/ngircd/ngircd/issues/223

src/ngircd/resolve.c

index 32791901215c475c95982616e8d95b321efe7680..e1903254605fafbf385f87159a6a5e6a601edaa8 100644 (file)
@@ -108,9 +108,7 @@ Resolve_Name( PROC_STAT *s, const char *Host, void (*cbfunc)(int, short))
        return false;
 } /* Resolve_Name */
 
        return false;
 } /* Resolve_Name */
 
-
-#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
-#if !defined(WANT_IPV6) && defined(h_errno)
+#ifdef h_errno
 static char *
 Get_Error( int H_Error )
 {
 static char *
 Get_Error( int H_Error )
 {
@@ -128,7 +126,6 @@ Get_Error( int H_Error )
        return "unknown error";
 }
 #endif
        return "unknown error";
 }
 #endif
-#endif
 
 
 /* Do "IDENT" (aka "AUTH") lookup and append result to resolved_addr array */
 
 
 /* Do "IDENT" (aka "AUTH") lookup and append result to resolved_addr array */