summaryrefslogtreecommitdiff
path: root/sys-process/atop/files/netatop-3.2.2-strict-prototype.patch
blob: 65a6a7c59ed375475ec43b6e99946a00fb130e0d (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Fix for strict prototypes error: declarations are fine,
definitions are missing void
https://bugs.gentoo.org/949835

Replace the deprecated init_module() and cleanup_module() entry points
with the module_init() and module_exit() macros.
https://bugs.gentoo.org/959282
diff --git a/netatop.c b/netatop.c
--- a/netatop.c
+++ b/netatop.c
@@ -1053,7 +1053,7 @@ garbage_collector(void)
 ** can be found at the head
 */
 static void
-gctaskexit()
+gctaskexit(void)
 {
 	unsigned long	flags;
 	struct taskinfo	*tip;
@@ -1087,7 +1087,7 @@ gctaskexit()
 ** cleanup sockinfo structures that are connected to finished processes
 */
 static void
-gcsockinfo()
+gcsockinfo(void)
 {
 	int		i;
 	struct sockinfo	*sip, *sipsave;
@@ -1300,7 +1300,7 @@ gcsockinfo()
 ** remove taskinfo structures of finished tasks from hash list
 */
 static void
-gctaskinfo()
+gctaskinfo(void)
 {
 	int		i;
 	struct taskinfo	*tip, *tipsave;
@@ -1376,7 +1376,7 @@ gctaskinfo()
 ** remove all sockinfo structs
 */
 static void
-wipesockinfo()
+wipesockinfo(void)
 {
 	struct sockinfo	*sip, *sipsave;
 	int 		i;
@@ -1404,7 +1404,7 @@ wipesockinfo()
 ** remove all taskinfo structs from hash list
 */
 static void
-wipetaskinfo()
+wipetaskinfo(void)
 {
 	struct taskinfo	*tip, *tipsave;
 	int 		i;
@@ -1432,7 +1432,7 @@ wipetaskinfo()
 ** remove all taskinfo structs from exit list
 */
 static void
-wipetaskexit()
+wipetaskexit(void)
 {
 	gctaskexit();
 }
@@ -1767,8 +1767,8 @@ static struct pernet_operations netatop_net_ops = {
 /*
 ** called when module loaded
 */
-int
-init_module()
+static int __init
+netatop_init(void)
 {
 	int i;
 
@@ -1868,8 +1868,8 @@ init_module()
 /*
 ** called when module unloaded
 */
-void
-cleanup_module()
+static void __exit
+netatop_exit(void)
 {
 	/*
  	** tell kernel daemon to stop
@@ -1903,3 +1903,6 @@ cleanup_module()
 	kmem_cache_destroy(ticache);
 	kmem_cache_destroy(sicache);
 }
+
+module_init(netatop_init)
+module_exit(netatop_exit)