dnsapi: Remove the critical section around res_query on Linux.
Hans Leidekker
hans at codeweavers.com
Wed Sep 8 05:16:46 CDT 2010
glibc's resolver supports threads since 2.3.2, released in 2003.
Fixes http://bugs.winehq.org/show_bug.cgi?id=24180
---
dlls/dnsapi/query.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index 6014465..f940078 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -52,6 +52,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(dnsapi);
#ifdef HAVE_RESOLV
+#ifndef __linux__
static CRITICAL_SECTION resolver_cs;
static CRITICAL_SECTION_DEBUG resolver_cs_debug =
{
@@ -64,6 +65,10 @@ static CRITICAL_SECTION resolver_cs = { &resolver_cs_debug, -1, 0, 0, 0, 0 };
#define LOCK_RESOLVER() do { EnterCriticalSection( &resolver_cs ); } while (0)
#define UNLOCK_RESOLVER() do { LeaveCriticalSection( &resolver_cs ); } while (0)
+#else
+#define LOCK_RESOLVER()
+#define UNLOCK_RESOLVER()
+#endif
/* call res_init() just once because of a bug in Mac OS X 10.4 */
/* call once per thread on systems that have per-thread _res */
--
1.7.0.4
More information about the wine-patches
mailing list