summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/SQL.cc8
-rw-r--r--lib/String.cc2
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/SQL.cc b/lib/SQL.cc
index e158904..26620e4 100644
--- a/lib/SQL.cc
+++ b/lib/SQL.cc
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#ifdef HAVE_MYSQL
+
#include "SQL.h"
SQLConnection::SQLConnection(String host, String user, String passwd,
@@ -66,3 +72,5 @@ AssocArray SQLConnection::fetchrow() {
return r;
}
+
+#endif
diff --git a/lib/String.cc b/lib/String.cc
index f24dcca..bd265a0 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -54,7 +54,7 @@ String::String(const char * s) : str(Base::strdup(s)), siz(::strlen(str)) {
#endif
}
-String::String(int hs, char * s) : str(Base::strdup(s ? s : "")), siz(hs) {
+String::String(int hs, char * s) : str(s), siz(hs) {
#ifdef DEBUG
fprintf(stderr, _("Fast-Creating a string with `%s' at %p from %p, this = %p\n"), str, str, s, this);
#endif