is thread-safe. Remove an incredibly stupid autoconf test which assumes that the lack of the getaddrinfo() flag AI_ADDRCONFIG means getaddrinfo() is not thread-safe. Although that was the case in the past and properly resulted in the threaded DNS support not being utilized on OpenBSD/NetBSD it is no longer true. ok sthen@
14 lines
514 B
Plaintext
14 lines
514 B
Plaintext
$OpenBSD: patch-src_Socket_cpp,v 1.1 2013/04/01 14:30:32 brad Exp $
|
|
--- src/Socket.cpp.orig Mon Apr 1 03:16:32 2013
|
|
+++ src/Socket.cpp Mon Apr 1 03:16:52 2013
|
|
@@ -114,7 +114,9 @@ void CSockManager::DoDNS(TDNSArg *arg) {
|
|
hints.ai_family = AF_UNSPEC;
|
|
hints.ai_socktype = SOCK_STREAM;
|
|
hints.ai_protocol = IPPROTO_TCP;
|
|
+#ifdef AI_ADDRCONFIG
|
|
hints.ai_flags = AI_ADDRCONFIG;
|
|
+#endif
|
|
arg->iRes = getaddrinfo(arg->sHostname.c_str(), NULL, &hints, &arg->aiResult);
|
|
if (EAGAIN != arg->iRes) {
|
|
break;
|