[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. 99ae9353f6834da0cb73f59f4b32d1f0ae1263fa
Stephen Gran
steve at lobefin.net
Thu Sep 4 12:36:49 UTC 2008
The following commit has been merged in the debian/unstable branch:
commit 1274297d5da954bac24875c7e479a05458aa85b6
Author: Stephen Gran <steve at lobefin.net>
Date: Thu Sep 4 13:25:25 2008 +0100
Revert "apply other part of r3852 for #1039"
This reverts commit 95ea7a2c77044b2251f21ca5560e8dbdb42b6b9a.
diff --git a/shared/network.c b/shared/network.c
index a054be4..98c3979 100644
--- a/shared/network.c
+++ b/shared/network.c
@@ -62,9 +62,6 @@ int r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t
{
struct hostent *hp2;
int ret = -1;
-#ifdef CL_THREAD_SAFE
- static pthread_mutex_t hostent_mutex = PTHREAD_MUTEX_INITIALIZER;
-#endif
if((hostname == NULL) || (hp == NULL))
return -1;
@@ -84,6 +81,8 @@ int r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t
#else
/* Single thread the code e.g. VS2005 */
#ifdef CL_THREAD_SAFE
+ static pthread_mutex_t hostent_mutex = PTHREAD_MUTEX_INITIALIZER;
+
pthread_mutex_lock(&hostent_mutex);
#endif
if((hp2 = gethostbyname(hostname)) == NULL) {
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list