blob: e3c102da07000f3f04aa3d8487e433808e4fec37 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- src/UDPSocket.cpp.orig Sun Mar 23 00:20:02 2003
+++ src/UDPSocket.cpp Sun Mar 23 00:22:39 2003
@@ -25,7 +25,7 @@
static pthread_attr_t attr;//=PTHREAD_CREATE_DETACHED;
#ifdef __FreeBSD__
-static pthread_mutex_t gethostby_mutex = PTHREAD_MUTEX_INITIALIZER;
+static wxMutex *s_mutexProtectingGetHostByName;
static int
convert (struct hostent *host, struct hostent *result,
@@ -131,7 +131,7 @@
{
struct hostent *host;
- pthread_mutex_lock (&gethostby_mutex);
+ s_mutexProtectingGetHostByName->Lock();
host = gethostbyname (name);
if (!host ||
@@ -140,7 +140,7 @@
result = NULL;
}
- pthread_mutex_unlock (&gethostby_mutex);
+ s_mutexProtectingGetHostByName->Unlock();
return result;
}
|