diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 8e29910..47f2fca 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -41,6 +41,10 @@ if( NOT LIBCLAMAV_FOUND ) tde_message_fatal( "ClamAV >=0.102.0 is required but not found on your system" ) 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) diff --git a/config.h.cmake b/config.h.cmake index 67860c5..d6cfd68 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -7,6 +7,5 @@ significant byte first (like Motorola and SPARC, unlike Intel). */ #cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ -/* Defined if you don't have either the XTest headers or - the xcb-util-keysyms headers */ -#cmakedefine NO_XTEST_EXTENSION 1 +/* Defined if libclamav API uses cl_error_t for return codes */ +#cmakedefine USE_CL_ERROR_T 1 diff --git a/src/dbviewer.cpp b/src/dbviewer.cpp index 7d5e200..c085ddd 100644 --- a/src/dbviewer.cpp +++ b/src/dbviewer.cpp @@ -839,7 +839,11 @@ void KlamDB::addVirusName(char *start) unsigned int KlamDB::getSigNos() { +# if defined(USE_CL_ERROR_T) cl_error_t ret = CL_CLEAN; +# else + unsigned int ret= 0; +# endif unsigned int no = 0; struct cl_engine *engine = NULL; TQStringList lastDownloadPaths;