Add check to see if the libclamav API uses cl_error_t for return codes.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/32/head r14.1.0
Slávek Banko 1 year ago
parent a28d15e492
commit d5b88d19a6
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -41,6 +41,10 @@ if( NOT LIBCLAMAV_FOUND )
tde_message_fatal( "ClamAV >=0.102.0 is required but not found on your system" ) tde_message_fatal( "ClamAV >=0.102.0 is required but not found on your system" )
endif( NOT LIBCLAMAV_FOUND ) endif( NOT LIBCLAMAV_FOUND )
if( NOT "${LIBCLAMAV_VERSION}" VERSION_LESS "0.103" )
set( USE_CL_ERROR_T 1 )
endif()
##### check for zlib (needed by Virus Browser) ##### check for zlib (needed by Virus Browser)

@ -7,6 +7,5 @@
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ #cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
/* Defined if you don't have either the XTest headers or /* Defined if libclamav API uses cl_error_t for return codes */
the xcb-util-keysyms headers */ #cmakedefine USE_CL_ERROR_T 1
#cmakedefine NO_XTEST_EXTENSION 1

@ -839,7 +839,11 @@ void KlamDB::addVirusName(char *start)
unsigned int KlamDB::getSigNos() unsigned int KlamDB::getSigNos()
{ {
# if defined(USE_CL_ERROR_T)
cl_error_t ret = CL_CLEAN; cl_error_t ret = CL_CLEAN;
# else
unsigned int ret= 0;
# endif
unsigned int no = 0; unsigned int no = 0;
struct cl_engine *engine = NULL; struct cl_engine *engine = NULL;
TQStringList lastDownloadPaths; TQStringList lastDownloadPaths;

Loading…
Cancel
Save