[Clamav-devel] [clamav-users] Incompatible clamav.h changes

Micah Snyder (micasnyd) micasnyd at cisco.com
Wed Feb 27 14:48:44 EST 2019


Hi Ale,

You're correct, there are non-backwards compatible changes in clamav.h in version 0.101.  The libclamav major version number as also increased to highlight the incompatibility.  

The changes are mentioned somewhat briefly in the release notes:
https://blog.clamav.net/2018/12/clamav-01010-has-been-released.html
https://github.com/Cisco-Talos/clamav-devel/blob/clamav-0.101.1/NEWS.md#some-of-the-more-obvious-changes 

CL_SCAN_STDOPT previously enabled all parsers, plus heuristic alerts (which were sometimes/inconsistently referred to as algorithmic detection): 
https://github.com/Cisco-Talos/clamav-devel/blob/clamav-0.100.2/libclamav/clamav.h#L181

In 0.101, CL_SCAN_STDOPT has gone away.  Instead, you can get the same functionality by setting the following, as shown in the example (https://github.com/Cisco-Talos/clamav-devel/blob/dev/0.101/examples/ex1.c#L93):

    options.parse |= ~0; /* enable all parsers */
    options.general |= CL_SCAN_GENERAL_HEURISTICS; /* enable heuristic alert options */

Regards,
Micah

Micah Snyder
ClamAV Development
Talos
Cisco Systems, Inc.
 

On 2/27/19, 2:02 PM, "clamav-users on behalf of Alessandro Vesely via clamav-users" <clamav-users-bounces at lists.clamav.net on behalf of clamav-users at lists.clamav.net> wrote:

    Hi,
    
    clamav.h has changed in version 101, resulting in compile errors like so:
    
    avfilter.c:270:21: error: ‘CL_SCAN_STDOPT’ undeclared (first use in this
    function); did you mean ‘CL_DB_STDOPT’?
       a->scan_options = CL_SCAN_STDOPT;
                         ^~~~~~~~~~~~~~
                         CL_DB_STDOPT
    
    Is there some documentation about those changes, ways to detect them at
    configure time, how to adapt client code, and the like?
    
    Thanks in advance
    Ale
    -- 
    
    
    
    
    
    _______________________________________________
    
    clamav-users mailing list
    clamav-users at lists.clamav.net
    https://lists.clamav.net/mailman/listinfo/clamav-users
    
    
    Help us build a comprehensive ClamAV guide:
    https://github.com/vrtadmin/clamav-faq
    
    http://www.clamav.net/contact.html#ml
    



More information about the clamav-devel mailing list