> I am trying to compile flow-tools .68 on FreeBSD 5.4 but I can't compile > it. ... > gcc -I./../lib -L./../lib -I. -I. -I../lib -g -Wall -g -Wall -c > `test -f 'flow-header.c' || echo './'`flow-header.c > > flow-header.c: In function `main': > > flow-header.c:51: warning: implicit declaration of function `getopt' > > flow-header.c:55: error: `optarg' undeclared (first use in this > function)
The problem is that the unistd.h file doesn't get included in FreeBSD 5.4, presumably because of the new gcc (3.4.2 on my 5.4 box). Since most of the other flow-tools main programs already include unistd.h directly, it seems the simplest fix is to do the same in flow-header.c also. Patch included below. With this patch, flow-tools 0.68 compile just fine on my FreeBSD 5.4 box. Steinar Haug, Nethelp consulting, [EMAIL PROTECTED] ---------------------------------------------------------------------- --- src/flow-header.c.orig Wed Apr 2 20:03:02 2003 +++ src/flow-header.c Tue Aug 9 19:41:25 2005 @@ -30,6 +30,7 @@ #include "ftbuild.h" #include <ftlib.h> +#include <unistd.h> #include <stdio.h> #include <stdlib.h> _______________________________________________ Flow-tools mailing list [EMAIL PROTECTED] http://mailman.splintered.net/mailman/listinfo/flow-tools
