Hey All,

The attached two patches will make building (with gcc) and running on
Solaris work. I've also pasted them to the below linked sites in case the
attachments don't go through. The patches ought to be applied in order.

Patch 1: http://ix.io/ceV (001-clamav-solaris.patch)
Patch 2: http://ix.io/ceW (002-clamav-solaris.patch)

Thanks,

Shawn


On Sat, May 10, 2014 at 12:13 PM, James Lee <li...@oxdrove.co.uk> wrote:

> On 10/05/2014 11:22, James Lee wrote:
>
>>
>> I think it is intended to call this via cl_initialize_crypto(), except
>> it's not called.
>> "__attribute__((constructor))" works, compiler tested, but not here.
>> ...
>>
>> Please don't take this as final, it's just a hint towards the problem.
>>
>
> Indeed <rant>it's the usual brain dead pile-O-rubbish that is configure
> and friends</rant>.
>
> *** simple workaround:
> CPPFLAGS="... -DHAVE_ATTRIB_PACKED"
>
> My complete CPPFLAGS are:
> CPPFLAGS="-D__EXTENSIONS__ -DHAVE_ATTRIB_PACKED"
>
>
>
> *** Fix
> Fix configure.
> configure checks for __attribute__((packed)) and make the wrong decision.
>
> configure assumes that if the compiler is not GNU it can't have the
> extension so doesn't  bother checking:
> #ifdef __GNUC__
> struct { int i __attribute__((packed)); } s;
> #else
> #error Only checking for packed attribute on gcc-like compilers
> #endif
>
> which is silly because if it's the gnu cc then the answer is already
> known, it's the non gnu cc that need checking. However moving on, based on
> the packed check this add to the headers:
> #ifndef HAVE_ATTRIB_PACKED
> #define __attribute__(x)
> #endif
> which renders all __attributes__ ineffective including the
> "__attribute__((constructor))" which is needed to initialise openssl. For
> it to work in the general case "__attribute__((constructor))" should be
> checked.
>
>
>
>
> James.
> _______________________________________________
> Help us build a comprehensive ClamAV guide:
> https://github.com/vrtadmin/clamav-faq
> http://www.clamav.net/support/ml
>
_______________________________________________
Help us build a comprehensive ClamAV guide:
https://github.com/vrtadmin/clamav-faq
http://www.clamav.net/support/ml

Reply via email to