summaryrefslogtreecommitdiffstats
path: root/package/ngircd/0001-Fix-Get_error-usage.patch
blob: 3724e46d89da2387252fac72874fb4921a321a4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 543f44bff8d56785dc13a74a14d4eaa96465bf05 Mon Sep 17 00:00:00 2001
From: Bernd Kuhls <bernd.kuhls@t-online.de>
Date: Wed, 13 Sep 2017 14:07:11 +0200
Subject: [PATCH] Fix Get_error usage

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

Patch sent upstream: https://github.com/ngircd/ngircd/pull/240

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
 src/ngircd/resolve.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/ngircd/resolve.c b/src/ngircd/resolve.c
index 32791901..e1903254 100644
--- a/src/ngircd/resolve.c
+++ b/src/ngircd/resolve.c
@@ -108,9 +108,7 @@ Resolve_Name( PROC_STAT *s, const char *Host, void (*cbfunc)(int, short))
 	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 )
 {
@@ -128,7 +126,6 @@ Get_Error( int H_Error )
 	return "unknown error";
 }
 #endif
-#endif
 
 
 /* Do "IDENT" (aka "AUTH") lookup and append result to resolved_addr array */
-- 
2.11.0

OpenPOWER on IntegriCloud