summaryrefslogtreecommitdiff
path: root/lib/String.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/String.cc')
-rw-r--r--lib/String.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/String.cc b/lib/String.cc
index ba84b4c..265883f 100644
--- a/lib/String.cc
+++ b/lib/String.cc
@@ -1,7 +1,8 @@
-#include <iostream>
+#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <ctype.h>
+#include <iostream>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
@@ -27,6 +28,10 @@ String::String(const String & s) : str(Base::strdup(s.str)), siz(s.siz) {
#endif
}
+#ifndef asprintf
+extern "C" int asprintf(char **, const char *, ...);
+#endif
+
String::String(char c) : siz(1) {
#ifdef DEBUG
fprintf(stderr, _("Creating a string with `%c' at %p, this = %p\n"), c, str, this);