[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. 99ae9353f6834da0cb73f59f4b32d1f0ae1263fa

Stephen Gran steve at lobefin.net
Thu Sep 4 12:36:51 UTC 2008


The following commit has been merged in the debian/unstable branch:
commit ef093e0d337e24690ac128d470c505a8ed0e6b8a
Author: Stephen Gran <steve at lobefin.net>
Date:   Thu Sep 4 13:25:29 2008 +0100

    Revert "merge r3834 from trunk"
    
    This reverts commit 7a449750070499ba14826e42e49ea77c2a811a54.

diff --git a/libclamav/mbox.c b/libclamav/mbox.c
index 5f50bfc..586ccad 100644
--- a/libclamav/mbox.c
+++ b/libclamav/mbox.c
@@ -4456,9 +4456,6 @@ my_r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t l
 {
 	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;
@@ -4483,8 +4480,9 @@ my_r_gethostbyname(const char *hostname, struct hostent *hp, char *buf, size_t l
 		return h_errno;
 #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) {
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