Only use alloca.h on OSes that have it.
authorJason Parker <jparker@digium.com>
Mon, 18 Sep 2006 21:24:50 +0000 (21:24 +0000)
committerJason Parker <jparker@digium.com>
Mon, 18 Sep 2006 21:24:50 +0000 (21:24 +0000)
Reported by jontow on IRC in #asterisk-dev

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43230 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/strcompat.c

index 38643fd..f6e3bfa 100644 (file)
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <alloca.h>
 #include <string.h>
 
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+
 #ifndef HAVE_STRSEP
 char *strsep(char **str, const char *delims)
 {