VUTBR / nf-tools

NetFlow processing tools
6 stars 3 forks source link

Libnf doesn't compile because of C99 in filter #15

Closed jwrona closed 8 years ago

jwrona commented 8 years ago

Recent filter code uses C99, but there are no compiler flags for this standard (or newer). This results in errors like

ffilter/ffilter.c: In function 'str_to_addr':
ffilter/ffilter.c:299:3: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
   for (int x = 0; x < 4; x++) {
   ^
ffilter/ffilter.c:299:3: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code

on CentOS 7 with GCC 4.8.5 and also Debian 8 with GCC 4.9.2.

Possible solution is to add AC_PROG_CC_STDC or AC_PROG_CC_C99 to the configure.ac.

tpoder1 commented 8 years ago

solved in 92690f5..d162e3d