[Asterisk-bsd] new error on fbsd

Wolfgang S. Rupprecht list+asterisk-bsd at lists.wsrcc.com
Sun Aug 29 17:48:56 CDT 2004


gbroiles at gmail.com (Greg Broiles) writes:
> On Sat, 28 Aug 2004 09:22:36 -0400, Richard Neese <bsdtech at runbox.com> wrote:
> > utils.c:26:20: alloca.h: No such file or directory
> > utils.c: In function `ast_strcasestr':
> > utils.c:391: warning: implicit declaration of function `alloca'
> > gmake: *** [utils.o] Error 1
> 
> I'm seeing this on OpenBSD, too.

Here is what I did to fix the various issues under obsd.

-wolfgang

Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.17
diff -u -r1.17 utils.c
--- utils.c	27 Aug 2004 04:21:09 -0000	1.17
+++ utils.c	29 Aug 2004 22:46:36 -0000
@@ -15,6 +15,7 @@
 #include <ctype.h>
 #include <string.h>
 #include <unistd.h>
+#incldue <stdlib.h>
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/socket.h>
@@ -23,15 +24,21 @@
 #include <asterisk/lock.h>
 #include <asterisk/utils.h>
 #include <asterisk/logger.h>
+
+#ifndef OpenBSD
 #include <alloca.h>
+#endif
 
 static char base64[64];
 static char b2a[256];
 
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__APPLE__)
 
+#ifndef ERANGE
 /* duh? ERANGE value copied from web... */
 #define ERANGE 34
+#endif
+
 #undef gethostbyname
 
 AST_MUTEX_DEFINE_STATIC(__mutex);



-- 
Wolfgang S. Rupprecht                http://www.wsrcc.com/wolfgang/
              asterisk patches for openbsd-current/amd64
      http://www.wsrcc.com/wolfgang/ftp/asterisk-openbsd35.patch


More information about the Asterisk-BSD mailing list