about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2008-10-19 20:06:45 +0200
committerAlexander Barton <alex@barton.de>2008-10-19 20:07:35 +0200
commit34b2f0085d8bf15d1187e743ae17f069acec7090 (patch)
tree8396ad13e5ea28af85d1bc1830b896ff4d038de2 /src
parentce2541a8266a1029ad7fef3aa82bfca22adec697 (diff)
downloadngircd-34b2f0085d8bf15d1187e743ae17f069acec7090.tar.gz
ngircd-34b2f0085d8bf15d1187e743ae17f069acec7090.zip
Fix ForwardLookup(): "ISO C90 forbids specifying subobject to initialize"
This patch fixes the following warning of GCC (version 4.3.2) in
function ForwardLookup():

resolve.c: In function 'ForwardLookup':
resolve.c:282: warning: ISO C90 forbids specifying subobject to initialize
resolve.c:284: warning: ISO C90 forbids specifying subobject to initialize
resolve.c:285: warning: ISO C90 forbids specifying subobject to initialize
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/resolve.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ngircd/resolve.c b/src/ngircd/resolve.c
index 041c1562..1eb35dd8 100644
--- a/src/ngircd/resolve.c
+++ b/src/ngircd/resolve.c
@@ -271,19 +271,21 @@ static bool
 ForwardLookup(const char *hostname, array *IpAddr)
 {
 	ng_ipaddr_t addr;
+
 #ifdef HAVE_GETADDRINFO
 	int res;
 	struct addrinfo *a, *ai_results;
-	static struct addrinfo hints = {
+	static struct addrinfo hints;
+
 #ifndef WANT_IPV6
-		.ai_family = AF_INET,
+	hints.ai_family = AF_INET;
 #endif
 #ifdef AI_ADDRCONFIG	/* glibc has this, but not e.g. netbsd 4.0 */
-		.ai_flags = AI_ADDRCONFIG,
+	hints.ai_flags = AI_ADDRCONFIG;
 #endif
-		.ai_socktype = SOCK_STREAM,
-		.ai_protocol = IPPROTO_TCP
-	};
+	hints.ai_socktype = SOCK_STREAM;
+	hints.ai_protocol = IPPROTO_TCP;
+
 #ifdef WANT_IPV6
 	assert(Conf_ConnectIPv6 || Conf_ConnectIPv4);