aboutsummaryrefslogtreecommitdiff
path: root/irc/scrollz/files/patch-source-ircaux.c
blob: ca9f3501f5ed3c4d8cb724554c003977656ab095 (plain) (blame)
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
--- source/ircaux.c.orig	Thu Oct  3 21:16:38 2002
+++ source/ircaux.c	Wed Dec 10 23:10:54 2003
@@ -861,20 +861,19 @@
 	err = getaddrinfo(localhost, localport, &hintsx, &res0x);
 
 	if (err != 0)
-#if defined(__linux__) && 0
-		/*
-		 * Due to bug in glibc implementation in getaddrinfo() we always
-		 * return -10.   This will be fixed, soon
-		 */
-		return -10;
-#else
 	{
+		# ifndef EAI_ADDRFAMILY
+		#  ifdef EAI_FAMILY
+		#   define EAI_ADDRFAMILY EAI_FAMILY
+		#  else
+		#   error "no EAI_ADDRFAMILY or EAI_FAMILY"
+		#  endif
+		# endif
 		if (err == EAI_ADDRFAMILY)
 			return -10;
 		else
 			return -2;
 	}
-#endif
 	err = -1;
 	for (resx = res0x; resx; resx = resx->ai_next)
 	{