pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/zabbix50-agent zabbix50-agent: fix build with...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bb05ace5cdd0
branches:  trunk
changeset: 390572:bb05ace5cdd0
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Fri Dec 23 09:25:17 2022 +0000

description:
zabbix50-agent: fix build with curl 7.87.0

diffstat:

 sysutils/zabbix50-agent/distinfo                                          |   3 +-
 sysutils/zabbix50-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c |  44 ++++++++++
 2 files changed, 46 insertions(+), 1 deletions(-)

diffs (62 lines):

diff -r f8964817fc27 -r bb05ace5cdd0 sysutils/zabbix50-agent/distinfo
--- a/sysutils/zabbix50-agent/distinfo  Fri Dec 23 02:33:43 2022 +0000
+++ b/sysutils/zabbix50-agent/distinfo  Fri Dec 23 09:25:17 2022 +0000
@@ -1,8 +1,9 @@
-$NetBSD: distinfo,v 1.6 2021/11/13 20:41:09 otis Exp $
+$NetBSD: distinfo,v 1.7 2022/12/23 09:25:17 wiz Exp $
 
 BLAKE2s (zabbix-5.0.17.tar.gz) = 7b5d674d79c41a0c9d9f6a8431408deaea101c5fe32034c115b3cb0350b9d647
 SHA512 (zabbix-5.0.17.tar.gz) = f7a23b51c3d2fb5f80ec888dc9eaf592dd13de3a61b9d065e6d54e1bb406e18ffef1b8e9d3ef516b2034d94fb7330bd80c2cb7b7d22eed7e57021bc66e1ee159
 Size (zabbix-5.0.17.tar.gz) = 21326776 bytes
 SHA1 (patch-configure) = cf647b9ee52a96882d31f8783ac19b66e3e65105
 SHA1 (patch-src_libs_zbxsysinfo_netbsd_net.c) = 468f2112a3d65b0a73f371194ae15ce0df0ad71c
+SHA1 (patch-src_libs_zbxsysinfo_simple_simple.c) = 4cadd37ec052eac400e6f1dd88f9945fc72c08ae
 SHA1 (patch-src_zabbix__agent_Makefile.in) = efbd804ecee4b99db36db5f4fd61583b2ef96a86
diff -r f8964817fc27 -r bb05ace5cdd0 sysutils/zabbix50-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/zabbix50-agent/patches/patch-src_libs_zbxsysinfo_simple_simple.c Fri Dec 23 09:25:17 2022 +0000
@@ -0,0 +1,44 @@
+$NetBSD: patch-src_libs_zbxsysinfo_simple_simple.c,v 1.1 2022/12/23 09:25:17 wiz Exp $
+
+Fix build with curl 7.87.0.
+
+--- src/libs/zbxsysinfo/simple/simple.c.orig   2021-10-18 08:01:42.000000000 +0000
++++ src/libs/zbxsysinfo/simple/simple.c
+@@ -164,25 +164,25 @@ static int       check_https(const char *host,
+       else
+               zbx_snprintf(https_host, sizeof(https_host), "%s%s", (0 == strncmp(host, "https://";, 8) ? "" : "https://";), host);
+ 
+-      if (CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_USERAGENT, "Zabbix " ZABBIX_VERSION)) ||
+-              CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_URL, https_host)) ||
+-              CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_PORT, (long)port)) ||
+-              CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_NOBODY, 1L)) ||
+-              CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_SSL_VERIFYPEER, 0L)) ||
+-              CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_SSL_VERIFYHOST, 0L)) ||
+-              CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_TIMEOUT, (long)timeout)))
++      if (CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_USERAGENT, "Zabbix " ZABBIX_VERSION)) ||
++              CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_URL, https_host)) ||
++              CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_PORT, (long)port)) ||
++              CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_NOBODY, 1L)) ||
++              CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYPEER, 0L)) ||
++              CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_SSL_VERIFYHOST, 0L)) ||
++              CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_TIMEOUT, (long)timeout)))
+       {
+-              zabbix_log(LOG_LEVEL_DEBUG, "%s: could not set cURL option [%d]: %s",
+-                              __func__, (int)opt, curl_easy_strerror(err));
++              zabbix_log(LOG_LEVEL_DEBUG, "%s: could not set cURL option: %s",
++                              __func__, curl_easy_strerror(err));
+               goto clean;
+       }
+ 
+       if (NULL != CONFIG_SOURCE_IP)
+       {
+-              if (CURLE_OK != (err = curl_easy_setopt(easyhandle, opt = CURLOPT_INTERFACE, CONFIG_SOURCE_IP)))
++              if (CURLE_OK != (err = curl_easy_setopt(easyhandle, CURLOPT_INTERFACE, CONFIG_SOURCE_IP)))
+               {
+-                      zabbix_log(LOG_LEVEL_DEBUG, "%s: could not set source interface option [%d]: %s",
+-                                      __func__, (int)opt, curl_easy_strerror(err));
++                      zabbix_log(LOG_LEVEL_DEBUG, "%s: could not set source interface option: %s",
++                                      __func__, curl_easy_strerror(err));
+                       goto clean;
+               }
+       }



Home | Main Index | Thread Index | Old Index