[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:07:29 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 4d00280b791b9670dd80d63ed028ad3bece7b83e
Author: Török Edvin <edwin at clamav.net>
Date:   Sat Oct 10 00:06:59 2009 +0300

    Partially fix the build: check for anon mmaps must be done always, remove a dead
    function, and add explicit paranthesis in (.&.)>.

diff --git a/configure b/configure
index 69455ab..3571bc8 100755
--- a/configure
+++ b/configure
@@ -13759,22 +13759,6 @@ $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
 	ac_cv_c_can_get_pagesize="yes"
 fi
 
-# Check whether --enable-mempool was given.
-if test "${enable_mempool+set}" = set; then :
-  enableval=$enable_mempool; enable_mempool=$enableval
-else
-  enable_mempool="yes"
-fi
-
-if test "$enable_mempool" = "yes"; then
-	if test "$ac_cv_c_mmap_private" != "yes"; then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: ****** mempool support disabled (mmap not available or not usable)" >&5
-$as_echo "$as_me: ****** mempool support disabled (mmap not available or not usable)" >&6;}
-	else
-		if test "$ac_cv_c_can_get_pagesize" != "yes"; then
-			{ $as_echo "$as_me:${as_lineno-$LINENO}: ****** mempool support disabled (pagesize cannot be determined)" >&5
-$as_echo "$as_me: ****** mempool support disabled (pagesize cannot be determined)" >&6;}
-		else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANON(YMOUS)" >&5
 $as_echo_n "checking for MAP_ANON(YMOUS)... " >&6; }
@@ -13836,6 +13820,22 @@ _ACEOF
 
 	fi
 
+# Check whether --enable-mempool was given.
+if test "${enable_mempool+set}" = set; then :
+  enableval=$enable_mempool; enable_mempool=$enableval
+else
+  enable_mempool="yes"
+fi
+
+if test "$enable_mempool" = "yes"; then
+	if test "$ac_cv_c_mmap_private" != "yes"; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: ****** mempool support disabled (mmap not available or not usable)" >&5
+$as_echo "$as_me: ****** mempool support disabled (mmap not available or not usable)" >&6;}
+	else
+		if test "$ac_cv_c_can_get_pagesize" != "yes"; then
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: ****** mempool support disabled (pagesize cannot be determined)" >&5
+$as_echo "$as_me: ****** mempool support disabled (pagesize cannot be determined)" >&6;}
+		else
 			if test "$ac_cv_c_mmap_anonymous" = "no"; then
 				{ $as_echo "$as_me:${as_lineno-$LINENO}: ****** mempool support disabled (anonymous mmap not available)" >&5
 $as_echo "$as_me: ****** mempool support disabled (anonymous mmap not available)" >&6;}
diff --git a/configure.in b/configure.in
index e1f6ef3..8d41b10 100644
--- a/configure.in
+++ b/configure.in
@@ -438,6 +438,7 @@ AC_FUNC_FSEEKO
 dnl Check if anon maps are available, check if we can determine the page size
 AC_C_FUNC_MMAP_PRIVATE
 AC_C_FUNC_PAGESIZE
+AC_C_FUNC_MMAP_ANONYMOUS
 AC_ARG_ENABLE([mempool],[  --disable-mempool       disable memory pools], enable_mempool=$enableval, enable_mempool="yes")
 if test "$enable_mempool" = "yes"; then
 	if test "$ac_cv_c_mmap_private" != "yes"; then
@@ -446,7 +447,6 @@ if test "$enable_mempool" = "yes"; then
 		if test "$ac_cv_c_can_get_pagesize" != "yes"; then
 			AC_MSG_NOTICE([****** mempool support disabled (pagesize cannot be determined)])
 		else
-			AC_C_FUNC_MMAP_ANONYMOUS
 			if test "$ac_cv_c_mmap_anonymous" = "no"; then
 				AC_MSG_NOTICE([****** mempool support disabled (anonymous mmap not available)])
 			else
diff --git a/libclamav/fmap.c b/libclamav/fmap.c
index 0fee5dd..3bfdab3 100644
--- a/libclamav/fmap.c
+++ b/libclamav/fmap.c
@@ -160,8 +160,8 @@ static void fmap_aging(fmap_t *m) {
 		} else {
 		    /* Insert sort onto a stack'd array - same performance as quickselect */
 		    unsigned int insert_to = MIN(maxavail, avail) - 1, age = m->bitmap[i] & FM_MASK_COUNT;
-		    if(avail <= maxavail || m->bitmap[freeme[maxavail]] & FM_MASK_COUNT > age) {
-			while(m->bitmap[freeme[insert_to]] & FM_MASK_COUNT > age) {
+		    if(avail <= maxavail || (m->bitmap[freeme[maxavail]] & FM_MASK_COUNT) > age) {
+			while((m->bitmap[freeme[insert_to]] & FM_MASK_COUNT) > age) {
 			    freeme[insert_to + 1] = freeme[insert_to];
 			    if(!insert_to--) break;
 			}
diff --git a/libclamav/pe.c b/libclamav/pe.c
index d706ca8..6bf1f19 100644
--- a/libclamav/pe.c
+++ b/libclamav/pe.c
@@ -277,15 +277,6 @@ static int cli_ddump(int desc, int offset, int size, const char *file) {
 }
 */
 
-static off_t cli_seeksect(int fd, struct cli_exe_section *s) {
-    off_t ret;
-
-    if(!s->rsz) return 0;
-    if((ret=lseek(fd, s->raw, SEEK_SET)) == -1)
-	cli_dbgmsg("cli_seeksect: lseek() failed\n");
-    return ret+1;
-}
-
 static unsigned int cli_md5sect(fmap_t *map, struct cli_exe_section *s, unsigned char *digest) {
     void *hashme;
     cli_md5_ctx md5;

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list