[asterisk-commits] trunk r13630 - in /trunk: agi/Makefile strcompat.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Mar 19 14:40:44 MST 2006


Author: russell
Date: Sun Mar 19 15:40:42 2006
New Revision: 13630

URL: http://svn.digium.com/view/asterisk?rev=13630&view=rev
Log:
fix the build of eagi-test on Solaris in combination with astmm

Modified:
    trunk/agi/Makefile
    trunk/strcompat.c

Modified: trunk/agi/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/agi/Makefile?rev=13630&r1=13629&r2=13630&view=diff
==============================================================================
--- trunk/agi/Makefile (original)
+++ trunk/agi/Makefile Sun Mar 19 15:40:42 2006
@@ -13,7 +13,7 @@
 
 AGIS=agi-test.agi eagi-test eagi-sphinx-test jukebox.agi
 
-CFLAGS+=
+CFLAGS+=-DNO_AST_MM
 
 LIBS=
 ifeq ($(OSARCH),SunOS)

Modified: trunk/strcompat.c
URL: http://svn.digium.com/view/asterisk/trunk/strcompat.c?rev=13630&r1=13629&r2=13630&view=diff
==============================================================================
--- trunk/strcompat.c (original)
+++ trunk/strcompat.c Sun Mar 19 15:40:42 2006
@@ -33,21 +33,18 @@
 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)



More information about the asterisk-commits mailing list