firnsy / barnyard2

Barnyard2 is a dedicated spooler for Snort's unified2 binary output format.
GNU General Public License v2.0
344 stars 190 forks source link

log.c compilation errors #128

Closed darkshade9 closed 9 years ago

darkshade9 commented 9 years ago

I am getting errors compiling barnyard on CentOS 6.5 ( with ./configure --with-mysql )

# make

make  all-recursive
make[1]: Entering directory `/root/hold/barnyard2'
Making all in src
make[2]: Entering directory `/root/hold/barnyard2/src'
Making all in sfutil
make[3]: Entering directory `/root/hold/barnyard2/src/sfutil'
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c getopt_long.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sfmemcap.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sfprimetable.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sfxhash.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sf_ip.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sf_iph.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sf_ipvar.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sf_textlog.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c sf_vartable.c
rm -f libsfutil.a
ar cru libsfutil.a getopt_long.o sfmemcap.o sfprimetable.o sfxhash.o sf_ip.o sf_iph.o sf_ipvar.o sf_textlog.o sf_vartable.o
ranlib libsfutil.a
make[3]: Leaving directory `/root/hold/barnyard2/src/sfutil'
Making all in output-plugins
make[3]: Entering directory `/root/hold/barnyard2/src/output-plugins'
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_arubaaction.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_bro.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_cef.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_csv.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_fast.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_full.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_fwsam.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_prelude.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_syslog.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_test.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_alert_unixsock.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_common.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_log_ascii.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_log_null.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_log_tcpdump.c
spo_log_tcpdump.c: In function ‘LogTcpdumpSingle’:
spo_log_tcpdump.c:369: warning: passing argument 1 of ‘SizeOf’ from incompatible pointer type
spo_log_tcpdump.c:361: note: expected ‘const struct pcap_pkthdr *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
spo_log_tcpdump.c:391: warning: passing argument 2 of ‘pcap_dump’ from incompatible pointer type
/usr/include/pcap/pcap.h:419: note: expected ‘const struct pcap_pkthdr *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_sguil.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_echidna.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_syslog_full.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_database.c
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I ../sfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spo_database_cache.c
rm -f libspo.a
ar cru libspo.a spo_alert_arubaaction.o spo_alert_bro.o spo_alert_cef.o spo_alert_csv.o spo_alert_fast.o spo_alert_full.o spo_alert_fwsam.o spo_alert_prelude.o spo_alert_syslog.o spo_alert_test.o spo_alert_unixsock.o spo_common.o spo_log_ascii.o spo_log_null.o spo_log_tcpdump.o spo_sguil.o spo_echidna.o spo_syslog_full.o spo_database.o spo_database_cache.o
ranlib libspo.a
make[3]: Leaving directory `/root/hold/barnyard2/src/output-plugins'
Making all in input-plugins
make[3]: Entering directory `/root/hold/barnyard2/src/input-plugins'
gcc -DHAVE_CONFIG_H -I. -I../..  -I.. -I../sfutil  -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c spi_unified2.c
rm -f libspi.a
ar cru libspi.a spi_unified2.o
ranlib libspi.a
make[3]: Leaving directory `/root/hold/barnyard2/src/input-plugins'
make[3]: Entering directory `/root/hold/barnyard2/src'
gcc -DHAVE_CONFIG_H -I. -I..  -Isfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c barnyard2.c
gcc -DHAVE_CONFIG_H -I. -I..  -Isfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c debug.c
gcc -DHAVE_CONFIG_H -I. -I..  -Isfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c decode.c
decode.c:84: warning: ‘struct DAQ_PktHdr_t’ declared inside parameter list
decode.c: In function ‘DecodePacket’:
decode.c:90: warning: passing argument 2 of ‘DecodeEthPkt’ from incompatible pointer type
decode.h:1851: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:95: warning: passing argument 2 of ‘DecodeIEEE80211Pkt’ from incompatible pointer type
decode.h:1894: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:100: warning: passing argument 2 of ‘DecodeEncPkt’ from incompatible pointer type
decode.h:1903: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:107: warning: passing argument 2 of ‘DecodeTRPkt’ from incompatible pointer type
decode.h:1891: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:111: warning: passing argument 2 of ‘DecodeFDDIPkt’ from incompatible pointer type
decode.h:1892: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:116: warning: passing argument 2 of ‘DecodeChdlcPkt’ from incompatible pointer type
decode.h:1898: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:128: warning: passing argument 2 of ‘DecodeSlipPkt’ from incompatible pointer type
decode.h:1895: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:141: warning: passing argument 2 of ‘DecodePppPkt’ from incompatible pointer type
decode.h:1901: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:154: warning: passing argument 2 of ‘DecodePppSerialPkt’ from incompatible pointer type
decode.h:1902: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:160: warning: passing argument 2 of ‘DecodeLinuxSLLPkt’ from incompatible pointer type
decode.h:1893: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:166: warning: passing argument 2 of ‘DecodePflog’ from incompatible pointer type
decode.h:1899: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:189: warning: passing argument 2 of ‘DecodeNullPkt’ from incompatible pointer type
decode.h:1852: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
decode.c:206: warning: passing argument 2 of ‘DecodeRawPkt’ from incompatible pointer type
decode.h:1853: note: expected ‘const struct DAQ_PktHdr_t *’ but argument is of type ‘const struct DAQ_PktHdr_t *’
gcc -DHAVE_CONFIG_H -I. -I..  -Isfutil -I/usr/include/mysql -DENABLE_MYSQL  -g -O2 -fno-strict-aliasing -Wall -c log.c
log.c: In function ‘PrintArpHeader’:
log.c:867: error: expected ‘)’ before ‘;’ token
log.c:867: error: too few arguments to function ‘memset’
log.c:920: error: expected ‘)’ before ‘;’ token
log.c:920: error: too few arguments to function ‘bcopy’
log.c:921: error: expected ‘)’ before ‘;’ token
log.c:929: error: expected ‘)’ before ‘;’ token
log.c:929: error: too few arguments to function ‘bcopy’
log.c:931: error: expected ‘)’ before ‘;’ token
log.c:942: error: expected ‘)’ before ‘;’ token
log.c:942: error: too few arguments to function ‘bcopy’
log.c:943: error: expected ‘)’ before ‘;’ token
log.c:975: error: expected ‘)’ before ‘;’ token
log.c:975: error: too few arguments to function ‘bcopy’
log.c:979: error: expected ‘)’ before ‘;’ token
make[3]: *** [log.o] Error 1
make[3]: Leaving directory `/root/hold/barnyard2/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/root/hold/barnyard2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/hold/barnyard2'
make: *** [all] Error 2
firnsy commented 9 years ago

Thanks for the heads up. We're updating the internal decode and snort includes to the latest stable upstream versions. This will be resolved shortly.