summaryrefslogtreecommitdiff
blob: 47fec4f73da839f47bbe711410927a3a98e1a8f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
commit 582fd497a5f0f5ae5dce24cba042d856d63bfbe1
Author: ABC <abc@telekom.ru>
Date:   Mon Feb 16 21:53:54 2015 +0400

    Compatibility of __get_cpu_var with linux 3.19.
    
    Fixes #28, thanks boyarsh@github.

diff --git a/ipt_NETFLOW.h b/ipt_NETFLOW.h
index bc2734f..5548e57 100644
--- a/ipt_NETFLOW.h
+++ b/ipt_NETFLOW.h
@@ -396,6 +396,9 @@ struct netflow_aggr_p {
 	__u16 aggr_port;
 };
 
+#ifndef __get_cpu_var
+#define __get_cpu_var(var)	(*this_cpu_ptr(&(var)))
+#endif
 #define NETFLOW_STAT_INC(count) (__get_cpu_var(ipt_netflow_stat).count++)
 #define NETFLOW_STAT_ADD(count, val) (__get_cpu_var(ipt_netflow_stat).count += (unsigned long long)val)
 #define NETFLOW_STAT_SET(count, val) (__get_cpu_var(ipt_netflow_stat).count = (unsigned long long)val)
diff --git a/testing.sh b/testing.sh
index b465c8d..caa4f03 100755
--- a/testing.sh
+++ b/testing.sh
@@ -6,7 +6,7 @@ if [ "$1" = "" ]; then
   echo Maintainer only tool.
   exit 1
 elif [ "$1" = all ]; then
-  exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17
+  exec bash $0 linux-2.6.18 centos5 linux-3.11.2 centos6 linux-3.4.66 linux-3.9.11 centos7 linux-3.14 linux-3.17 linux-3.19
   exit 1
 fi
 
@@ -33,6 +33,9 @@ readarray -t opts <<EOF
   --enable-sampler=hash
   --enable-promisc
 EOF
+if [ "$SHORT" ]; then
+  opts=("")
+fi
 
 colorecho() {
   echo -e "\033[1;32m$@\033[m"