diff --git a/configure.in b/configure.in
index 1940834..567f216 100644
--- a/configure.in
+++ b/configure.in
@@ -73,7 +73,6 @@ AC_DEFUN([GCC_STACK_PROTECT_CC],[
   fi
 ])
 
-
 if test "$GCC" = "yes"; then
 	# We are using the GNU C compiler. Good!
 	CFLAGS="$CFLAGS -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes"
@@ -125,7 +124,6 @@ AC_TRY_COMPILE([
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
 
-
 # -- Libraries --
 
 AC_CHECK_LIB(UTIL,memmove)
@@ -141,7 +139,8 @@ AC_CHECK_FUNCS([ \
 	bind gethostbyaddr gethostbyname gethostname inet_ntoa \
 	setsid setsockopt socket strcasecmp waitpid],,AC_MSG_ERROR([required function missing!]))
 
-AC_CHECK_FUNCS(inet_aton isdigit sigaction snprintf vsnprintf strdup strlcpy strlcat strtok_r)
+AC_CHECK_FUNCS(getaddrinfo getnameinfo inet_aton isdigit sigaction snprintf \
+ vsnprintf strdup strlcpy strlcat strtok_r)
 
 # -- Configuration options --
 
@@ -479,6 +478,8 @@ AC_ARG_ENABLE(ipv6,
 	if test "$enableval" = "yes"; then x_ipv6_on=yes; fi
 )
 if test "$x_ipv6_on" = "yes"; then
+	# getaddrinfo() and getnameinfo() are optional when not compiling
+	# with IPv6 support, but are required for IPv6 to work!
 	AC_CHECK_FUNCS([ \
 		getaddrinfo getnameinfo \
 		],,AC_MSG_ERROR([required function missing for IPv6 support!]))
diff --git a/src/ipaddr/ng_ipaddr.c b/src/ipaddr/ng_ipaddr.c
index 0367a1f..a88e428 100644
--- a/src/ipaddr/ng_ipaddr.c
+++ b/src/ipaddr/ng_ipaddr.c
@@ -51,6 +51,8 @@ ng_ipaddr_init(ng_ipaddr_t *addr, const char *ip_str, UINT16 port)
 	return ret == 0;
 #else /* HAVE_GETADDRINFO */
 	assert(ip_str);
+	memset(addr, 0, sizeof *addr);
+	addr->sin4.sin_len = sizeof(addr->sin4);
 	addr->sin4.sin_family = AF_INET;
 # ifdef HAVE_INET_ATON
 	if (inet_aton(ip_str, &addr->sin4.sin_addr) == 0)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 731647d..f7c6e22 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -512,6 +512,7 @@ NewListener(const char *listen_addr, UINT16 Port)
 #ifdef ZEROCONF
 	char name[CLIENT_ID_LEN], *info;
 #endif
+
 	if (!InitSinaddrListenAddr(&addr, listen_addr, Port))
 		return -1;
 
