aboutsummaryrefslogtreecommitdiffstats
path: root/cli.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-14 23:36:30 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-12-14 23:36:30 +0000
commit70cedacdde512d2ed5984eec242c55f3239b73fc (patch)
tree48694f38698e4ead3840305333816193c7fcd8a0 /cli.c
parentc60f8a2b8e1551244e674baff85cb1a4f2d5fd5b (diff)
Merge slimey's Solaris compatibility (with small mods) (bug #2740)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4446 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'cli.c')
-rwxr-xr-xcli.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli.c b/cli.c
index 28d40cad0..8a99c6e4b 100755
--- a/cli.c
+++ b/cli.c
@@ -47,7 +47,12 @@ void ast_cli(int fd, char *fmt, ...)
va_list ap;
va_start(ap, fmt);
+#ifdef SOLARIS
+ stuff = (char *)malloc(10240);
+ vsnprintf(stuff, 10240, fmt, ap);
+#else
res = vasprintf(&stuff, fmt, ap);
+#endif
va_end(ap);
if (res == -1) {
ast_log(LOG_ERROR, "Out of memory\n");