Merge slimey's Solaris compatibility (with small mods) (bug #2740)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-12-14 23:36:30 +00:00
parent 0f205bb079
commit 9d40b8ee80
55 changed files with 1098 additions and 62 deletions

5
cli.c
View File

@@ -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");