mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 10:33:13 +00:00
fix the build of eagi-test on Solaris in combination with astmm
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@13630 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
|
AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
|
||||||
|
|
||||||
CFLAGS+=
|
CFLAGS+=-DNO_AST_MM
|
||||||
|
|
||||||
LIBS=
|
LIBS=
|
||||||
ifeq ($(OSARCH),SunOS)
|
ifeq ($(OSARCH),SunOS)
|
||||||
|
@@ -33,21 +33,18 @@ char* strsep(char** str, const char* delims)
|
|||||||
int setenv(const char *name, const char *value, int overwrite)
|
int setenv(const char *name, const char *value, int overwrite)
|
||||||
{
|
{
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
int buflen, ret;
|
int buflen;
|
||||||
|
|
||||||
buflen = strlen(name) + strlen(value) + 2;
|
buflen = strlen(name) + strlen(value) + 2;
|
||||||
if ((buf = malloc(buflen)) == NULL)
|
if (!(buf = alloca(buflen)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (!overwrite && getenv(name))
|
if (!overwrite && getenv(name))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
snprintf(buf, buflen, "%s=%s", name, value);
|
snprintf(buf, buflen, "%s=%s", name, value);
|
||||||
ret = putenv(buf);
|
|
||||||
|
|
||||||
free(buf);
|
return putenv(buf);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void unsetenv(const char *name)
|
void unsetenv(const char *name)
|
||||||
|
Reference in New Issue
Block a user