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

aCaB acab at clamav.net
Sun Apr 4 00:59:09 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 0c8d736899dcf1fd7699ed4332f3195f6014e146
Author: aCaB <acab at clamav.net>
Date:   Fri Jul 17 02:30:21 2009 +0200

    fix typo, workaround crappy preprocessors (bb#1658)

diff --git a/ChangeLog b/ChangeLog
index ceb8a7d..6572c77 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Jul 17 02:28:50 CEST 2009 (acab)
+------------------------------------
+ * libclamav/others.h, libclamav/ishield.c: fix typo,
+			 workaround crappy preprocessors (bb#1658)
+
 Thu Jul 16 23:01:34 CEST 2009 (tk)
 ----------------------------------
  * libclamav/cab.c: downgrade warning message (bb#1659)
diff --git a/libclamav/ishield.c b/libclamav/ishield.c
index df423bb..003129e 100644
--- a/libclamav/ishield.c
+++ b/libclamav/ishield.c
@@ -516,7 +516,7 @@ static int is_parse_hdr(int desc, cli_ctx *ctx, struct IS_CABSTUFF *c) {
 	    return CL_EREAD; /* hdr must be within bounds, it's k to hard fail here */
 	}
     } else {
-#if HAVE_MMAP && HAVE_CLI_GETPAGESIZE
+#if defined(HAVE_MMAP) && defined(HAVE_CLI_GETPAGESIZE)
 	int psz = cli_getpagesize();
 	off_t mp_hdr = (c->hdr / psz) * psz;
 	mp_hdrsz = c->hdrsz + c->hdr - mp_hdr;
@@ -527,7 +527,7 @@ static int is_parse_hdr(int desc, cli_ctx *ctx, struct IS_CABSTUFF *c) {
 	hdr = map + c->hdr - mp_hdr;
 #else
 	cli_warnmsg("is_parse_hdr: hdr too big and mmap is not usable\n");
-	return CL_CLEAN
+	return CL_CLEAN;
 #endif
     }
 
diff --git a/libclamav/others.h b/libclamav/others.h
index 7cb8721..0a24acd 100644
--- a/libclamav/others.h
+++ b/libclamav/others.h
@@ -27,6 +27,10 @@
 #include "clamav-config.h"
 #endif
 
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include "cltypes.h"
@@ -373,7 +377,9 @@ static inline int cli_getpagesize() { return sysconf(_SC_PAGESIZE); }
 static inline int cli_getpagesize() { return getpagesize(); }
 #define HAVE_CLI_GETPAGESIZE 1
 #endif
-#define HAVE_CLI_GETPAGESIZE 0
+#ifdef HAVE_CLI_GETPAGESIZE
+#undef HAVE_CLI_GETPAGESIZE
+#endif
 #endif
 
 void *cli_malloc(size_t nmemb);

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list