From: Eric Leblond Date: Wed, 9 Mar 2016 15:57:29 +0000 (+0100) Subject: af-packet: disable most code when not built in X-Git-Tag: suricata-3.0.1RC1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=994bc15c2a42230cc4493f6a9df33db13764c32b;p=thirdparty%2Fsuricata.git af-packet: disable most code when not built in When af-packet is not build we can avoid to build a large amount of code. --- diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index cd98b22950..3d3b6cdeca 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -83,6 +83,9 @@ void RunModeIdsAFPRegister(void) return; } + +#ifdef HAVE_AF_PACKET + void AFPDerefConfig(void *conf) { AFPIfaceConfig *pfp = (AFPIfaceConfig *)conf; @@ -475,6 +478,9 @@ int AFPRunModeIsIPS() return has_ips; } +#endif + + int RunModeIdsAFPAutoFp(void) { SCEnter(); diff --git a/src/suricata.c b/src/suricata.c index e454b8b043..cbdea55150 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -984,6 +984,7 @@ static TmEcode ParseInterfacesList(int run_mode, char *pcap_dev) /* not an error condition if we have a 1.0 config */ LiveBuildDeviceList("pfring"); } +#ifdef HAVE_AF_PACKET } else if (run_mode == RUNMODE_AFP_DEV) { /* iface has been set on command line */ if (strlen(pcap_dev)) { @@ -1002,6 +1003,7 @@ static TmEcode ParseInterfacesList(int run_mode, char *pcap_dev) EngineModeSetIPS(); } } +#endif #ifdef HAVE_NETMAP } else if (run_mode == RUNMODE_NETMAP) { /* iface has been set on command line */