Problem compiling under FreeBSD-4.2

Peter Van Epp vanepp at sfu.ca
Sat Jan 27 13:18:38 EST 2001


	As well a quick glance at FreeBSD 4.2 indicates my bpf.c patch hasn't
made it in to at least 4.2-RELEASE yet. I hope to get to upgrading one of my
machines to 4.2 later today and will send Carter the patch for inclusion in the
FAQ. Basiclly the bug in bpf.c means that argus never sees the last few packets
in a not completely full bpf buffer because there is no code to time out and 
flush the buffer towards libpcap/argus. There is a FreeBSD pr outstanding on 
it and I'll have a look at its status.

Peter Van Epp / Operations and Technical Support 
Simon Fraser University, Burnaby, B.C. Canada

> 
> I found a compile error w/compiling on FreeBSD-4.2...  Here's the error:
> 
>  gcc -pthread -O -I . -I../include  -I../include/linux-include
> -DHAVE_SYS_IOCCOM_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_ETHER_HOSTTON=1
> -DHAVE_STRERROR=1 -DHAVE_SOCKADDR_SA_LEN=1 -c ./argus.c
> ./argus.c: In function `ArgusCreatePIDFile':
> ./argus.c:152: `LONG_MAX' undeclared (first use in this function)
> ./argus.c:152: (Each undeclared identifier is reported only once
> ./argus.c:152: for each function it appears in.)
> *** Error code 1
> 
> It appears that LONG_MAX is not currently defined in any of the includes
> that are in argus.c...  Anyhow, I found LONG_MAX in /usr/include/machine
> and added a statement below the Solaris "#include <limits.h>"
> statement...  Here's the diffs to make it work (I'm not sure I did it
> right, but it looks good...  :)
> 
> $ diff argus-2.0.0U/server/argus.c argus-2.0.0U-fix/server/argus.c
> 129a130,132
> > #if defined(__FreeBSD__)
> > #include <machine/limits.h>
> > #endif
> 
> After that it compiled fine (haven't run it yet, cause I need some
> sleep)...  Will report any problems tommorow while I'm diddling with
> it...
> 
> Mark Buchanan
> 



More information about the argus mailing list