summaryrefslogtreecommitdiff
path: root/net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-06-02 00:07:23 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-06-02 00:07:23 +0100
commit6657c680376cedf378fcf328e5fa03ed3b41d580 (patch)
tree44ea8d174f647daca562b9bdcbcb527a85a77d0a /net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch
parent1551fe56fd6ba43a94509cffc61b6bf854b7ac9f (diff)
gentoo auto-resync : 02:06:2024 - 00:07:23
Diffstat (limited to 'net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch')
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch b/net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch
new file mode 100644
index 000000000000..fd8f16c7b6e2
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.9.4-c99.patch
@@ -0,0 +1,30 @@
+https://github.com/net-snmp/net-snmp/issues/815
+https://github.com/net-snmp/net-snmp/commit/d30d63523bfd9ccc85175e484fea821815273237
+
+From d30d63523bfd9ccc85175e484fea821815273237 Mon Sep 17 00:00:00 2001
+From: Bart Van Assche <bvanassche@acm.org>
+Date: Wed, 15 May 2024 10:08:04 -0600
+Subject: [PATCH] snmptrapd: Fix compilation against recent versions of the
+ MySQL library
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fix the following build error:
+
+snmptrapd_sql.c:541:50: error: assignment to ‘_Bool *’ from incompatible pointer type ‘char *’ [-Wincompatible-pointer-types]
+541 | _tbind[TBIND_v3_SECURITY_ENGINE].is_null = &_no_v3;
+
+Fixes: https://github.com/net-snmp/net-snmp/issues/815
+--- a/apps/snmptrapd_sql.c
++++ b/apps/snmptrapd_sql.c
+@@ -201,7 +201,7 @@ typedef struct sql_buf_t {
+ * static bind structures, plus 2 static buffers to bind to.
+ */
+ static MYSQL_BIND _tbind[TBIND_MAX], _vbind[VBIND_MAX];
+-static char _no_v3;
++static typeof(*((MYSQL_BIND*)NULL)->is_null) _no_v3;
+
+ static void _sql_process_queue(u_int dontcare, void *meeither);
+
+