File 0004-use-getaddrinfo.patch of Package ihu

diff -aur a/src/Transmitter.cpp b/src/Transmitter.cpp
--- a/src/Transmitter.cpp
+++ b/src/Transmitter.cpp
@@ -132,12 +132,13 @@
 	
 	if (inet_aton(host.ascii(), &sa.sin_addr) == 0)
 	{
-		struct hostent *he;
+		struct addrinfo hints, *res;
+		hints.ai_family = AF_INET;
 
-		he = gethostbyname(host.ascii());
-		if (he == NULL)
+		if (!getaddrinfo(host.ascii(), NULL, &hints, &res))
 			throw Error(tr("can't resolve ") + host.ascii());
-		sa.sin_addr = *(struct in_addr *) he ->h_addr;
+		sa.sin_addr = ((struct sockaddr_in *)(res->ai_addr))->sin_addr;
+		freeaddrinfo(res);
 	}
 	
 	int type = 0;
openSUSE Build Service is sponsored by