dect
/
asterisk
Archived
13
0
Fork 0

fix the build of eagi-test on Solaris in combination with astmm

git-svn-id: http://svn.digium.com/svn/asterisk/trunk@13630 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
russell 2006-03-19 21:40:42 +00:00
parent 63e2848d64
commit 8275cee238
2 changed files with 4 additions and 7 deletions

View File

@ -13,7 +13,7 @@
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
CFLAGS+=
CFLAGS+=-DNO_AST_MM
LIBS=
ifeq ($(OSARCH),SunOS)

View File

@ -33,21 +33,18 @@ char* strsep(char** str, const char* delims)
int setenv(const char *name, const char *value, int overwrite)
{
unsigned char *buf;
int buflen, ret;
int buflen;
buflen = strlen(name) + strlen(value) + 2;
if ((buf = malloc(buflen)) == NULL)
if (!(buf = alloca(buflen)))
return -1;
if (!overwrite && getenv(name))
return 0;
snprintf(buf, buflen, "%s=%s", name, value);
ret = putenv(buf);
free(buf);
return ret;
return putenv(buf);
}
void unsetenv(const char *name)