diff options
| author | Wolfgang Rohdewald <wolfgang@rohdewald.de> | 2009-07-27 23:29:54 +0200 |
|---|---|---|
| committer | Wolfgang Rohdewald <wolfgang@rohdewald.de> | 2009-07-27 23:29:54 +0200 |
| commit | 5c504b6a858813276477822db6b7a5912a2c7593 (patch) | |
| tree | a251a0f5391b496ddf341e95931ce20e45cb4978 | |
| parent | 764467dbf4c393ac2f102b5da5b27224e16a90f5 (diff) | |
| download | vdr-plugin-muggle-5c504b6a858813276477822db6b7a5912a2c7593.tar.gz vdr-plugin-muggle-5c504b6a858813276477822db6b7a5912a2c7593.tar.bz2 | |
gcc 4.4 fixes vdr-developer.org Ticket #112 by Heffer
| -rw-r--r-- | mg_db_gd_mysql.c | 9 | ||||
| -rw-r--r-- | mg_tools.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/mg_db_gd_mysql.c b/mg_db_gd_mysql.c index c067a81..e089575 100644 --- a/mg_db_gd_mysql.c +++ b/mg_db_gd_mysql.c @@ -148,9 +148,9 @@ mgDbGd::Threadsafe() { #ifndef HAVE_ONLY_SERVER static char *mysql_embedded_args[] = { - "muggle", + 0, 0, // placeholder for --datadir= - "--key_buffer_size=32M" + 0 }; static void @@ -169,6 +169,11 @@ mgDbServerMySQL::mgDbServerMySQL() { mysql_embedded_groups[2] = "muggle_SERVER"; mysql_embedded_groups[3] = 0; int argv_size; + if (!mysql_embedded_args[0]) { + // we never free those but only allocate them once: + mysql_embedded_args[0] = strdup("muggle"); + mysql_embedded_args[2] = strdup("--key_buffer_size=32M"); + } if (UsingEmbeddedMySQL()) { argv_size = sizeof(mysql_embedded_args) / sizeof(char *); struct stat stbuf; @@ -17,6 +17,7 @@ #include <iostream> #include <sstream> #include <string> +#include <cstdarg> using namespace std; |
