]> git.stg.codes - stg.git/commitdiff
Fixed compilation with linux-3.5.1 and higher.
authorMaxim Mamontov <faust.madf@gmail.com>
Sun, 11 Nov 2012 16:50:14 +0000 (18:50 +0200)
committerMaxim Mamontov <faust.madf@gmail.com>
Sun, 11 Nov 2012 16:50:14 +0000 (18:50 +0200)
projects/stargazer/build
projects/stargazer/plugins/capture/ipq_linux/libipq.h

index 60c8e1ff035e4c07008c3cec1c62146fbf9f084a..a3b64c196b06e7df50ccdbf5279aaf693c5bdfa0 100755 (executable)
@@ -335,6 +335,20 @@ else
     fi
 fi
 
+echo -n "Checking for linux/netfilter_ipv4/ip_queue.h... "
+echo "#include <linux/netfilter_ipv4/ip_queue.h> 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" ]
index 41cca57e3cf91a747d93faf9127fc99e50f66e86..5f06057ac791a7cfa808152a885583eb29ee88e0 100644 (file)
 #include "ip_queue_64.h"
 typedef u_int64_t ipq_id_t;
 #else
+#ifdef HAS_IP_QUEUE_H
 #include <linux/netfilter_ipv4/ip_queue.h>
+#else
+#include "ip_queue.h"
+#endif
 typedef unsigned long ipq_id_t;
 #endif