fix typo, workaround crappy preprocessors (bb#1658)

0.96
aCaB 16 years ago
parent d6f52e0904
commit 0c8d736899
  1. 5
      ChangeLog
  2. 4
      libclamav/ishield.c
  3. 8
      libclamav/others.h

@ -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)

@ -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
}

@ -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);

Loading…
Cancel
Save