Problem compiling under FreeBSD-4.2

Mark Buchanan markbuchanan at home.com
Sat Jan 27 05:15:51 EST 2001


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