net-snmp: update to 5.9.4
[feed/packages.git] / net / net-snmp / patches / 010-HOST-MIB-hr_filesys-fix-compile-error.patch
1 From 9588b5c9c27239b1f8c02f0bf417f13735e93225 Mon Sep 17 00:00:00 2001
2 From: Stijn Tintel <stijn@linux-ipv6.be>
3 Date: Sat, 26 Sep 2020 04:34:18 +0300
4 Subject: [PATCH] HOST-MIB, hr_filesys: fix compile error
5
6 On non-AIX systems without getfsstat, a variable is being declared right
7 after a label. This is a violation of the C language standard, and
8 causes the following compile error:
9
10 host/hr_filesys.c: In function 'Get_Next_HR_FileSys':
11 host/hr_filesys.c:752:5: error: a label can only be part of a statement and a declaration is not a statement
12 const char **cpp;
13 ^~~~~
14
15 Fix the problem by adding an empty statement after the label.
16
17 Fixes: 22e1371bb1fd ("HOST-MIB, hr_filesys: Convert recursion into iteration")
18
19 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
20 ---
21 agent/mibgroup/host/hr_filesys.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 --- a/agent/mibgroup/host/hr_filesys.c
25 +++ b/agent/mibgroup/host/hr_filesys.c
26 @@ -718,7 +718,7 @@ static const char *HRFS_ignores[] = {
27 int
28 Get_Next_HR_FileSys(void)
29 {
30 -next:
31 +next: ;
32 #ifdef HAVE_GETFSSTAT
33 if (HRFS_index >= fscount)
34 return -1;