summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Rohdewald <wolfgang@rohdewald.de>2009-07-27 23:29:54 +0200
committerWolfgang Rohdewald <wolfgang@rohdewald.de>2009-07-27 23:29:54 +0200
commit5c504b6a858813276477822db6b7a5912a2c7593 (patch)
treea251a0f5391b496ddf341e95931ce20e45cb4978
parent764467dbf4c393ac2f102b5da5b27224e16a90f5 (diff)
downloadvdr-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.c9
-rw-r--r--mg_tools.h1
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;
diff --git a/mg_tools.h b/mg_tools.h
index 3886dc4..026e5cc 100644
--- a/mg_tools.h
+++ b/mg_tools.h
@@ -17,6 +17,7 @@
#include <iostream>
#include <sstream>
#include <string>
+#include <cstdarg>
using namespace std;