From 993289f9a8abcaa85250856d5940b569b7f21068 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sun, 11 Nov 2012 18:50:14 +0200 Subject: [PATCH] Fixed compilation with linux-3.5.1 and higher. --- projects/stargazer/build | 14 ++++++++++++++ .../stargazer/plugins/capture/ipq_linux/libipq.h | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/projects/stargazer/build b/projects/stargazer/build index 60c8e1ff..a3b64c19 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -335,6 +335,20 @@ else fi fi +echo -n "Checking for linux/netfilter_ipv4/ip_queue.h... " +echo "#include int main() { return 0; }" > build_check.c +$CC $CFLAGS $LDFLAGS build_check.c -lexpat -o fake > /dev/null 2> /dev/null +if [ $? != 0 ] +then + CHECK_IP_QUEUE_H=no + echo "no" +else + CHECK_IP_QUEUE_H=yes + DEFS="$DEFS HAS_IP_QUEUE_H" + echo "yes" +fi +rm -f fake + rm -f build_check.c if [ "$CHECK_EXPAT" != "yes" ] diff --git a/projects/stargazer/plugins/capture/ipq_linux/libipq.h b/projects/stargazer/plugins/capture/ipq_linux/libipq.h index 41cca57e..5f06057a 100644 --- a/projects/stargazer/plugins/capture/ipq_linux/libipq.h +++ b/projects/stargazer/plugins/capture/ipq_linux/libipq.h @@ -35,7 +35,11 @@ #include "ip_queue_64.h" typedef u_int64_t ipq_id_t; #else +#ifdef HAS_IP_QUEUE_H #include +#else +#include "ip_queue.h" +#endif typedef unsigned long ipq_id_t; #endif -- 2.44.2