From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- .../nettop/files/nettop-0.2.3-gcc411.patch | 49 ++++++++++++++++++++++ .../nettop/files/nettop-0.2.3-offbyone.patch | 29 +++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch create mode 100644 net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch (limited to 'net-analyzer/nettop/files') diff --git a/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch new file mode 100644 index 000000000000..5e516eab0907 --- /dev/null +++ b/net-analyzer/nettop/files/nettop-0.2.3-gcc411.patch @@ -0,0 +1,49 @@ +--- a/nettop.c ++++ b/nettop.c +@@ -70,6 +70,7 @@ + #include + #include + #include ++#include + + #include "node.h" + #include "ent.h" +@@ -216,22 +217,26 @@ + } + } + +- ether.count = ether.size = (int) ether.l = (int) ether.r = 0; ++ ether.count = ether.size = 0; ++ ether.l = ether.r = 0; + ether.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + ether.size_h[i] = 0; + +- ip.count = ip.size = (int) ip.l = (int) ip.r = 0; ++ ip.count = ip.size = 0; ++ ip.l = ip.r = 0; + ip.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + ip.size_h[i] = 0; + +- tcp.count = tcp.size = (int) tcp.l = (int) tcp.r = 0; ++ tcp.count = tcp.size = 0; ++ tcp.l = tcp.r = 0; + tcp.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + tcp.size_h[i] = 0; + +- udp.count = udp.size = (int) udp.l = (int) udp.r = 0; ++ udp.count = udp.size = 0; ++ udp.l = udp.r = 0; + udp.type = -1; + for (i = 0; i < HISTORY_SIZE; i++) + udp.size_h[i] = 0; +@@ -361,6 +366,7 @@ + } + break; + default: ++ break; + } + } + } diff --git a/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch new file mode 100644 index 000000000000..32ab3d64ad4c --- /dev/null +++ b/net-analyzer/nettop/files/nettop-0.2.3-offbyone.patch @@ -0,0 +1,29 @@ +--- a/nettop.c ++++ b/nettop.c +@@ -384,7 +385,7 @@ + void + screen_update() + { +- struct node *sorted[24] = {0}; ++ struct node *sorted[25] = {0}; + unsigned long long sump, sums, valp, vals; + unsigned long long xfrrate = 0; + int i, do_ipprint, last[3] = {0}; +@@ -512,7 +513,7 @@ + void + ipprint(int last[]) + { +- struct node *sorted[24] = {0}; ++ struct node *sorted[25] = {0}; + struct ent *proto; + unsigned long long valp, vals, sump, sums; + unsigned long long xfrrate = 0; +@@ -575,7 +576,7 @@ + void + servprint(int last[], struct node *tree, int type) + { +- struct node *sorted[24] = {0}; ++ struct node *sorted[25] = {0}; + struct ent *e; + struct ent *service; + unsigned long long vals, valp, sums, sump; -- cgit v1.2.3