summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2017-08-26 13:32:44 +0200
committerJeroen Roovers <jer@gentoo.org>2017-08-26 13:33:00 +0200
commitb1e51e769ea330c59b24d3ea0f0590e2094efaf1 (patch)
treecf283b3887dcf72c4618d6aaa857b48ff7706761 /net-analyzer/net-snmp/files
parentdev-haskell/stack: block against dev-haskell/stack-bin[symlink] (diff)
downloadgentoo-b1e51e769ea330c59b24d3ea0f0590e2094efaf1.tar.gz
gentoo-b1e51e769ea330c59b24d3ea0f0590e2094efaf1.tar.bz2
gentoo-b1e51e769ea330c59b24d3ea0f0590e2094efaf1.zip
net-analyzer/net-snmp: Fix MySQL bindings by Peter Levine (bug #627588).
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'net-analyzer/net-snmp/files')
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch37
-rw-r--r--net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch70
2 files changed, 107 insertions, 0 deletions
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch
new file mode 100644
index 000000000000..8660a3257560
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.7.3-mariadb-10.2.patch
@@ -0,0 +1,37 @@
+--- a/apps/snmptrapd_sql.c
++++ b/apps/snmptrapd_sql.c
+@@ -54,6 +54,7 @@
+ #include <my_sys.h>
+ #include <mysql.h>
+ #include <errmsg.h>
++#include <mysql_version.h>
+
+ netsnmp_feature_require(container_fifo)
+
+@@ -437,6 +438,7 @@ netsnmp_mysql_init(void)
+ return -1;
+ }
+
++#if MYSQL_VERSION_ID < 100000
+ #ifdef HAVE_BROKEN_LIBMYSQLCLIENT
+ my_init();
+ #else
+@@ -445,6 +447,7 @@ netsnmp_mysql_init(void)
+
+ /** load .my.cnf values */
+ load_defaults ("my", _sql.groups, &not_argc, &not_argv);
++#endif
+ for(i=0; i < not_argc; ++i) {
+ if (NULL == not_argv[i])
+ continue;
+@@ -542,6 +545,10 @@ netsnmp_mysql_init(void)
+ return -1;
+ }
+
++#if MYSQL_VERSION_ID > 100000
++ mysql_options(_sql.conn, MYSQL_READ_DEFAULT_GROUP, "snmptrapd");
++#endif
++
+ /** try to connect; we'll try again later if we fail */
+ (void) netsnmp_mysql_connect();
+
diff --git a/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch b/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch
new file mode 100644
index 000000000000..45855597a867
--- /dev/null
+++ b/net-analyzer/net-snmp/files/net-snmp-5.7.3-perl524-2.patch
@@ -0,0 +1,70 @@
+--- a/perl/ASN/Makefile.PL
++++ b/perl/ASN/Makefile.PL
+@@ -1,3 +1,4 @@
++package ASN;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/AnyData_SNMP/Makefile.PL
++++ b/perl/AnyData_SNMP/Makefile.PL
+@@ -1,3 +1,4 @@
++package AnyData_SNMP;
+ use ExtUtils::MakeMaker;
+ # See lib/ExtUtils/MakeMaker.pm for details of how to influence
+ # the contents of the Makefile that is written.
+--- a/perl/OID/Makefile.PL
++++ b/perl/OID/Makefile.PL
+@@ -1,3 +1,4 @@
++package OID;
+ # See lib/ExtUtils/MakeMaker.pm for details of how to influence
+ # the contents of the Makefile that is written.
+
+--- a/perl/SNMP/Makefile.PL
++++ b/perl/SNMP/Makefile.PL
+@@ -1,3 +1,4 @@
++package SNMP;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/TrapReceiver/Makefile.PL
++++ b/perl/TrapReceiver/Makefile.PL
+@@ -1,3 +1,4 @@
++package TrapReceiver;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/agent/Makefile.PL
++++ b/perl/agent/Makefile.PL
+@@ -1,3 +1,4 @@
++package agent;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/agent/Support/Makefile.PL
++++ b/perl/agent/Support/Makefile.PL
+@@ -1,3 +1,4 @@
++package agent_Support;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/agent/default_store/Makefile.PL
++++ b/perl/agent/default_store/Makefile.PL
+@@ -1,3 +1,4 @@
++package agent_default_store;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/default_store/Makefile.PL
++++ b/perl/default_store/Makefile.PL
+@@ -1,3 +1,4 @@
++package default_store;
+ use ExtUtils::MakeMaker;
+ require 5;
+ use Config;
+--- a/perl/manager/Makefile.PL
++++ b/perl/manager/Makefile.PL
+@@ -1,3 +1,4 @@
++package manager;
+ use ExtUtils::MakeMaker;
+ # See lib/ExtUtils/MakeMaker.pm for details of how to influence
+ # the contents of the Makefile that is written.