1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-20 07:38:40 +02:00
openwrt-packages/net/net-snmp/patches/010-HOST-MIB-hr_filesys-fix-compile-error.patch
Stijn Tintel 4cdbe799b1 net-snmp: bump to 5.9
Neither the configure option nor configure variable to disable linking
against PCRE seem to work anymore, so simply drop both and add a
dependency on libpcre. As net-snmp is unlikely to fit on devices with
small flash anyway, the extra size requirement shouldn't be a problem.
If it is, feel free to submit a patch to fix the broken upstream
behaviour.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2021-03-17 21:53:10 +02:00

35 lines
1.1 KiB
Diff

From 9588b5c9c27239b1f8c02f0bf417f13735e93225 Mon Sep 17 00:00:00 2001
From: Stijn Tintel <stijn@linux-ipv6.be>
Date: Sat, 26 Sep 2020 04:34:18 +0300
Subject: [PATCH] HOST-MIB, hr_filesys: fix compile error
On non-AIX systems without getfsstat, a variable is being declared right
after a label. This is a violation of the C language standard, and
causes the following compile error:
host/hr_filesys.c: In function 'Get_Next_HR_FileSys':
host/hr_filesys.c:752:5: error: a label can only be part of a statement and a declaration is not a statement
const char **cpp;
^~~~~
Fix the problem by adding an empty statement after the label.
Fixes: 22e1371bb1fd ("HOST-MIB, hr_filesys: Convert recursion into iteration")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
---
agent/mibgroup/host/hr_filesys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/agent/mibgroup/host/hr_filesys.c
+++ b/agent/mibgroup/host/hr_filesys.c
@@ -718,7 +718,7 @@ static const char *HRFS_ignores[] = {
int
Get_Next_HR_FileSys(void)
{
-next:
+next: ;
#if HAVE_GETFSSTAT
if (HRFS_index >= fscount)
return -1;