Subject: pkg/31576: small issue in clamav 0.87
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Admin Root <root@www.napolinet.dk>
List: pkgsrc-bugs
Date: 10/13/2005 16:59:00
>Number:         31576
>Category:       pkg
>Synopsis:       clamav fails to build with old gcc
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 13 16:59:00 +0000 2005
>Originator:     Admin Root
>Release:        NetBSD 1.6
>Organization:
NapoliNet ab
>Environment:
gcc -v
Using builtin specs.
gcc version 2.95.3 20010315 (release) (NetBSD nb3)
System: NetBSD www.napolinet.dk 1.6 NetBSD 1.6 (GENERIC) #0: Sun Sep 8 19:43:40 UTC 2002 autobuild@tgm.daemon.org:/autobuild/i386/OBJ/autobuild/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Using a rater old gcc (2.95.3) the following fails to compile (clamav-milter):

>How-To-Repeat:
Build clamav in the source tree
>Fix:
See below



clamd_recv(int sock, char *buf, size_t len)
{
        fd_set rfds;
        struct timeval tv;

        assert(sock >= 0);
        int ret;


Reordering to: 
clamd_recv(int sock, char *buf, size_t len)
{
        fd_set rfds;
        struct timeval tv;
        int ret;

        assert(sock >= 0);



solves the problem.

Strangely this actually also how it appears in the clamav CVS repository. Somehow the reordering has been introduced in the netbsd distribution.


>Unformatted: