[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 01:05:46 UTC 2010
The following commit has been merged in the debian/unstable branch:
commit 11195c0b1bbf346e36b36d7e8224ee873c1a26f1
Author: aCaB <acab at clamav.net>
Date: Fri Sep 25 00:09:13 2009 +0200
fix several problems introduced by the win32 commits
diff --git a/ChangeLog b/ChangeLog
index dbfa56d..3ab0bd2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 25 00:31:29 CEST 2009 (acab)
+------------------------------------
+ * fix several problems introduced by the win32 commits
+ many thanks edwin and sherpya
+
Thu Sep 24 19:43:50 CEST 2009 (acab)
------------------------------------
* libclamav/others_common.c: Accept "/" as an absolute path
diff --git a/clamav-milter/connpool.c b/clamav-milter/connpool.c
index 0de3a62..04eaa92 100644
--- a/clamav-milter/connpool.c
+++ b/clamav-milter/connpool.c
@@ -37,6 +37,7 @@
#include "shared/optparser.h"
#include "shared/output.h"
+#include "shared/misc.h"
#include "connpool.h"
#include "netcode.h"
diff --git a/libclamav/binhex.c b/libclamav/binhex.c
index 9584ac5..d3a429a 100644
--- a/libclamav/binhex.c
+++ b/libclamav/binhex.c
@@ -103,8 +103,11 @@ static char const rcsid[] = "$Id: binhex.c,v 1.23 2007/02/12 20:46:08 njh Exp $"
#include <stdio.h>
#include <memory.h>
#include <sys/stat.h>
-#include "others.h"
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
+#include "others.h"
#include "mbox.h"
#include "binhex.h"
diff --git a/libclamav/chmunpack.c b/libclamav/chmunpack.c
index 4494727..64c582d 100644
--- a/libclamav/chmunpack.c
+++ b/libclamav/chmunpack.c
@@ -31,6 +31,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include <string.h>
#include "others.h"
diff --git a/libclamav/htmlnorm.c b/libclamav/htmlnorm.c
index bc56c1b..b777491 100644
--- a/libclamav/htmlnorm.c
+++ b/libclamav/htmlnorm.c
@@ -39,6 +39,9 @@
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include "others.h"
#include "htmlnorm.h"
diff --git a/libclamav/ishield.c b/libclamav/ishield.c
index 9f3708e..58bbc5e 100644
--- a/libclamav/ishield.c
+++ b/libclamav/ishield.c
@@ -39,6 +39,9 @@
#if HAVE_STRINGS_H
#include <strings.h>
#endif
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include <zlib.h>
#include "scanners.h"
diff --git a/libclamav/libclamav.map b/libclamav/libclamav.map
index 5a136a1..0654dbc 100644
--- a/libclamav/libclamav.map
+++ b/libclamav/libclamav.map
@@ -33,7 +33,6 @@ CLAMAV_PUBLIC {
CLAMAV_PRIVATE {
global:
cli_gettmpdir;
- cli_is_abspath;
cli_strtok;
cli_strtokenize;
cli_cvdunpack;
diff --git a/libclamav/mpool.c b/libclamav/mpool.c
index 7976562..0f9666f 100644
--- a/libclamav/mpool.c
+++ b/libclamav/mpool.c
@@ -35,6 +35,9 @@
#if HAVE_STRING_H
#include <string.h>
#endif
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include <stddef.h>
#include "others.h"
diff --git a/libclamav/nsis/nulsft.c b/libclamav/nsis/nulsft.c
index ffa95ad..5ca1441 100644
--- a/libclamav/nsis/nulsft.c
+++ b/libclamav/nsis/nulsft.c
@@ -30,6 +30,9 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include "others.h"
#include "cltypes.h"
diff --git a/libclamav/ole2_extract.c b/libclamav/ole2_extract.c
index 510fab3..0952504 100644
--- a/libclamav/ole2_extract.c
+++ b/libclamav/ole2_extract.c
@@ -34,6 +34,9 @@
#endif
#include <ctype.h>
#include <stdlib.h>
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include "clamav.h"
#include "cltypes.h"
diff --git a/libclamav/others.h b/libclamav/others.h
index 76eab63..09a48ce 100644
--- a/libclamav/others.h
+++ b/libclamav/others.h
@@ -398,7 +398,6 @@ int cli_updatelimits(cli_ctx *, unsigned long);
unsigned long cli_getsizelimit(cli_ctx *, unsigned long);
int cli_matchregex(const char *str, const char *regex);
void cli_qsort(void *basep, size_t nelems, size_t size, int (*comp)(const void *, const void *));
-int cli_is_abspath(const char *path);
/* symlink behaviour */
#define CLI_FTW_FOLLOW_FILE_SYMLINK 0x01
diff --git a/libclamav/others_common.c b/libclamav/others_common.c
index 9ae25ca..7f3f619 100644
--- a/libclamav/others_common.c
+++ b/libclamav/others_common.c
@@ -910,13 +910,3 @@ void cli_qsort(void *basep, size_t nelems, size_t size, int (*comp)(const void *
}
}
}
-
-int cli_is_abspath(const char *path) {
-#ifdef _WIN32
- int len = strlen(path);
- return (len > 2 && path[0] == '\\' && path[1] == '\\') || (len > 3 && path[1] == ':' && path[2] == '\\');
-#else
- return *path == '/';
-#endif
-}
-
diff --git a/libclamav/pdf.c b/libclamav/pdf.c
index fa82218..b79ec53 100644
--- a/libclamav/pdf.c
+++ b/libclamav/pdf.c
@@ -41,7 +41,9 @@ static char const rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $";
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
-
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include <zlib.h>
#include "clamav.h"
diff --git a/libclamav/special.c b/libclamav/special.c
index 19a6ce3..c713542 100644
--- a/libclamav/special.c
+++ b/libclamav/special.c
@@ -30,6 +30,7 @@
#endif
#include <string.h>
#include <ctype.h>
+#include <netinet/in.h>
#include "clamav.h"
#include "others.h"
#include "cltypes.h"
diff --git a/libclamav/unzip.c b/libclamav/unzip.c
index 03ab4f4..07693e2 100644
--- a/libclamav/unzip.c
+++ b/libclamav/unzip.c
@@ -35,6 +35,9 @@
#endif
#include <stdlib.h>
#include <stdio.h>
+#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
+#include <sys/mman.h>
+#endif
#include <zlib.h>
#include "inflate64.h"
diff --git a/platform.h.in b/platform.h.in
index 0c70621..44992eb 100644
--- a/platform.h.in
+++ b/platform.h.in
@@ -33,7 +33,3 @@ typedef unsigned int in_addr_t;
#else
#define PATHSEP "/"
#endif
-
-#if defined(HAVE_MMAP) && defined(HAVE_SYS_MMAN_H)
-#include <sys/mman.h>
-#endif
diff --git a/shared/misc.c b/shared/misc.c
index 40e6496..1ed39e4 100644
--- a/shared/misc.c
+++ b/shared/misc.c
@@ -316,3 +316,11 @@ int cfg_tcpsock(const struct optstruct *opts, struct sockaddr_in *tcpsock, in_ad
return 0;
}
+int cli_is_abspath(const char *path) {
+#ifdef _WIN32
+ int len = strlen(path);
+ return (len > 2 && path[0] == '\\' && path[1] == '\\') || (len > 3 && path[1] == ':' && path[2] == '\\');
+#else
+ return *path == '/';
+#endif
+}
diff --git a/shared/misc.h b/shared/misc.h
index 7ceabe7..87d1ee4 100644
--- a/shared/misc.h
+++ b/shared/misc.h
@@ -54,4 +54,6 @@ int daemonize(void);
const char *get_version(void);
int match_regex(const char *filename, const char *pattern);
int cfg_tcpsock(const struct optstruct *opts, struct sockaddr_in *server, in_addr_t defaultbind);
+int cli_is_abspath(const char *path);
+
#endif
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list