diff --git a/configure.ac b/configure.ac index ce85ebfb..64a37a9c 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,7 @@ AC_SUBST(SKELETONS_CFLAGS) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(sys/param.h) +AC_CHECK_HEADERS(alloca.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_BIGENDIAN diff --git a/skeletons/asn_system.h b/skeletons/asn_system.h index a9c4ad3c..24d8da79 100644 --- a/skeletons/asn_system.h +++ b/skeletons/asn_system.h @@ -15,13 +15,16 @@ #include /* For snprintf(3) */ #include /* For *alloc(3) */ -#include /* For alloca(3) */ #include /* For memcpy(3) */ #include /* For size_t */ #include /* For LONG_MAX */ #include /* For va_start */ #include /* for offsetof and ptrdiff_t */ +#ifdef HAVE_ALLOCA_H +#include /* For alloca(3) */ +#endif + #ifdef _WIN32 #include