zabbix: upgrade 6.2.7 -> 6.4.21

0001-initialize-msghdr-portably.patch
removed since it's included in 6.4.21

releasenote:
 https://www.zabbix.com/rn/rn6.4.21

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Wang Mingyu 2025-02-13 14:56:25 +08:00 committed by Khem Raj
parent f6352cd450
commit 39a89a4b88
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 2 additions and 55 deletions

View File

@ -1,52 +0,0 @@
From 37b662cf44e14b33e93759d4b129d23095b41372 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 31 Aug 2022 23:55:02 -0700
Subject: [PATCH] initialize msghdr portably
on linux we have musl as an option for system C library and current
initialization assumes the structure to be same as glibc, therefore
initialize the elements of structure instead, so it can work on both
glibc and musl.
Fixes
net.c:115:79: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
struct msghdr s_msg = { (void *)&s_sa, sizeof(struct sockaddr_nl), s_io, 1, NULL, 0, 0};
^~~~
Upstream-Status: Submitted [https://github.com/zabbix/zabbix/pull/77]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/libs/zbxsysinfo/linux/net.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/libs/zbxsysinfo/linux/net.c b/src/libs/zbxsysinfo/linux/net.c
index 1425a3604d..98f03de0dd 100644
--- a/src/libs/zbxsysinfo/linux/net.c
+++ b/src/libs/zbxsysinfo/linux/net.c
@@ -114,13 +114,21 @@ static int find_tcp_port_by_state_nl(unsigned short port, int state, int *found)
struct sockaddr_nl s_sa = { AF_NETLINK, 0, 0, 0 };
struct iovec s_io[1] = { { &request, sizeof(request) } };
- struct msghdr s_msg = { (void *)&s_sa, sizeof(struct sockaddr_nl), s_io, 1, NULL, 0, 0};
+ struct msghdr s_msg = { 0 };
+ s_msg.msg_name = (void *)&s_sa;
+ s_msg.msg_namelen = sizeof(struct sockaddr_nl);
+ s_msg.msg_iov = s_io;
+ s_msg.msg_iovlen = 1;
char buffer[BUFSIZ] = { 0 };
struct sockaddr_nl r_sa = { AF_NETLINK, 0, 0, 0 };
struct iovec r_io[1] = { { buffer, BUFSIZ } };
- struct msghdr r_msg = { (void *)&r_sa, sizeof(struct sockaddr_nl), r_io, 1, NULL, 0, 0};
+ struct msghdr r_msg = { 0 };
+ r_msg.msg_name = (void *)&r_sa;
+ r_msg.msg_namelen = sizeof(struct sockaddr_nl);
+ r_msg.msg_iov = r_io;
+ r_msg.msg_iovlen = 1;
struct nlmsghdr *r_hdr;
--
2.37.3

View File

@ -23,12 +23,11 @@ DEPENDS = "libevent libpcre openldap virtual/libiconv zlib"
PACKAGE_ARCH = "${MACHINE_ARCH}"
SRC_URI = "https://cdn.zabbix.com/zabbix/sources/stable/6.2/${BPN}-${PV}.tar.gz \
SRC_URI = "https://cdn.zabbix.com/zabbix/sources/stable/6.4/${BPN}-${PV}.tar.gz \
file://0001-Fix-configure.ac.patch \
file://0001-initialize-msghdr-portably.patch \
file://zabbix-agent.service \
"
SRC_URI[sha256sum] = "6d423810667b948ed22052d9aa84a035e2d4b92cbe8efdb669cac529806b722d"
SRC_URI[sha256sum] = "527010dbd45cf204dcd3b38e82df696b908b74f38e8d1ab9bbbb1292e784f394"
inherit autotools-brokensep linux-kernel-base pkgconfig systemd useradd