This is a Works For Me (TM) patch.  I notice there are plenty of other
compiler warnings that should be fixed, but as this is just a targetted
bug fix patch, I let them be for now.

--- klamav-0.38.orig/src/dbviewer.cpp
+++ klamav-0.38/src/dbviewer.cpp
@@ -788,7 +788,8 @@

     unsigned int ret= 0;
     unsigned int no = 0;
-    struct cl_node *root = NULL;
+    struct cl_engine *root = NULL;
+    unsigned int cl_options = CL_SCAN_STDOPT;
     QStringList lastDownloadPaths;
     QString dbdir;
     QString db;
@@ -799,7 +800,7 @@
     dbdir = lastDownloadPaths.first();


-    ret = cl_loaddbdir((const char *)dbdir, &root, &no);
+    ret = cl_load((const char *)dbdir, &root, &no, cl_options);
     //kdDebug() << "no " << no << endl;
     cl_free(root);
     return no;
only in patch2:
unchanged:
--- klamav-0.38.orig/src/klammail/clamdmail.c
+++ klamav-0.38/src/klammail/clamdmail.c
@@ -94,9 +94,10 @@
                 unsigned long int size = 0;
                 long double mb;
                 const char *virname;
-                struct cl_node *root = NULL;
+                struct cl_engine *root = NULL;
                 struct cl_limits limits;
                 struct stat sb;
+                unsigned int cl_options = CL_SCAN_STDOPT;



@@ -192,13 +193,13 @@
                                 stat(getargc(opt, 'd'), &sb);
                                 switch(sb.st_mode & S_IFMT) {
                                         case S_IFREG:
-                                        if((ret = cl_loaddb(getargc(opt, 'd'), 
&root, &no))) {
+                                        if((ret = cl_load(getargc(opt, 'd'), 
&root, &no, cl_options))) {
                                                 mprintf("@%s\n", 
cl_strerror(ret));
                                                 return 50;
                                         }
                                         break;
                                         case S_IFDIR:
-                                        if((ret = cl_loaddbdir(getargc(opt, 
'd'), &root, &no))) {
+                                        if((ret = cl_load(getargc(opt, 'd'), 
&root, &no, cl_options))) {
                                                 mprintf("@%s\n", 
cl_strerror(ret));
                                                 return 50;
                                         }
only in patch2:
unchanged:
--- klamav-0.38.orig/src/freshklam.cpp
+++ klamav-0.38/src/freshklam.cpp
@@ -821,7 +821,8 @@
 QString  Freshklam::getCurrentDBDir(){
         unsigned int ret= 0;
     unsigned int no = 0;
-        struct cl_node *root = NULL;
+        struct cl_engine *root = NULL;
+        unsigned int cl_options = CL_SCAN_STDOPT;
     QStringList lastDownloadPaths;
     QString dbdir;
     QString db;
@@ -835,7 +836,7 @@


     if (dbdir != dir_combo->url()){
-        ret = cl_loaddbdir((const char *)dir_combo->url(), &root, &no);
+        ret = cl_load((const char *)dir_combo->url(), &root, &no, cl_options);
         ////kdDebug() << "ret " << ret << endl;
         if (no == 0){
             db = dbdir;

-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        [EMAIL PROTECTED] |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

Reply via email to