summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-01-18 14:40:50 -0800
committerKhem Raj <raj.khem@gmail.com>2023-01-21 10:02:02 -0800
commitee0de616df82937191613c85f9df7e872b99ed6f (patch)
tree586ae35fc3846af0aaa58ed0c57ab4dc4d96f54e /meta-networking/recipes-protocols
parent791d82af215f76984dc141bb5bf253c9176ee716 (diff)
downloadmeta-openembedded-ee0de616df82937191613c85f9df7e872b99ed6f.tar.gz
net-snmp: Fix build with clang16
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-noreturn-attribute-to-netsnmp_pci_error.patch32
-rw-r--r--meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-noreturn-attribute-to-netsnmp_pci_error.patch b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-noreturn-attribute-to-netsnmp_pci_error.patch
new file mode 100644
index 000000000..6fbace75a
--- /dev/null
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-Add-noreturn-attribute-to-netsnmp_pci_error.patch
@@ -0,0 +1,32 @@
1From 5719f40db65a72624a0b0f08e546d12bf823bd1e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 18 Jan 2023 14:38:44 -0800
4Subject: [PATCH] Add noreturn attribute to netsnmp_pci_error()
5
6Fixes build with clang16
7| mibgroup/if-mib/data_access/interface_linux.c:152:23: error: incompatible function pointer types assigning to 'void (*)(char *, ...) __attribute__((noreturn))' from 'void (char *, ...)' [-Wincompatible-function-pointer-types]
8| pci_access->error = netsnmp_pci_error;
9| ^ ~~~~~~~~~~~~~~~~~
10
11Upstream-Status: Pending
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 agent/mibgroup/if-mib/data_access/interface_linux.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/agent/mibgroup/if-mib/data_access/interface_linux.c b/agent/mibgroup/if-mib/data_access/interface_linux.c
18index c6cc54e..12eb865 100644
19--- a/agent/mibgroup/if-mib/data_access/interface_linux.c
20+++ b/agent/mibgroup/if-mib/data_access/interface_linux.c
21@@ -31,7 +31,7 @@ static struct pci_access *pci_access;
22 /* Avoid letting libpci call exit(1) when no PCI bus is available. */
23 static int do_longjmp =0;
24 static jmp_buf err_buf;
25-static void
26+__attribute__((noreturn)) static void
27 netsnmp_pci_error(char *msg, ...)
28 {
29 va_list args;
30--
312.39.1
32
diff --git a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb
index 7af514756..78d711fbf 100644
--- a/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb
+++ b/meta-networking/recipes-protocols/net-snmp/net-snmp_5.9.3.bb
@@ -26,6 +26,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \
26 file://net-snmp-fix-for-disable-des.patch \ 26 file://net-snmp-fix-for-disable-des.patch \
27 file://reproducibility-have-printcap.patch \ 27 file://reproducibility-have-printcap.patch \
28 file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \ 28 file://0001-ac_add_search_path.m4-keep-consistent-between-32bit.patch \
29 file://0001-Add-noreturn-attribute-to-netsnmp_pci_error.patch \
29 " 30 "
30SRC_URI[sha256sum] = "2097f29b7e1bf3f1300b4bae52fa2308d0bb8d5d3998dbe02f9462a413a2ef0a" 31SRC_URI[sha256sum] = "2097f29b7e1bf3f1300b4bae52fa2308d0bb8d5d3998dbe02f9462a413a2ef0a"
31 32