Use my_init instead of MY_INIT, the later one is not working with MySQL 5.5

This commit is contained in:
Jan Safranek 2011-02-15 13:04:04 +01:00
parent 5dc158b98a
commit 4a0af56c67
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,14 @@
MySQL 5.5 does not export 'const char *my_progname', so MY_INIT cannot be used.
diff -up net-snmp-5.6.1/apps/snmptrapd_sql.c.orig net-snmp-5.6.1/apps/snmptrapd_sql.c
--- net-snmp-5.6.1/apps/snmptrapd_sql.c.orig 2010-11-30 22:08:59.000000000 +0100
+++ net-snmp-5.6.1/apps/snmptrapd_sql.c 2011-02-15 13:01:31.631486477 +0100
@@ -434,7 +434,7 @@ netsnmp_mysql_init(void)
return -1;
}
- MY_INIT("snmptrapd");
+ my_init();
/** load .my.cnf values */
load_defaults ("my", _sql.groups, &not_argc, &not_argv);

View File

@ -36,6 +36,7 @@ Patch6: net-snmp-5.5-perl-linking.patch
Patch7: net-snmp-5.6-test-debug.patch
Patch8: net-snmp-5.6.1-find-librpm.patch
Patch9: net-snmp-5.6.1-rpm-modernize.patch
Patch10: net-snmp-5.6.1-mysql.patch
Requires(post): chkconfig
Requires(preun): chkconfig
@ -170,6 +171,7 @@ Net-SNMP toolkit library.
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1 -b .mysql
%build
MIBS="host agentx smux \