diff --git a/lib/com_err/parse.y b/lib/com_err/parse.y index 8550c8d41..922de9671 100644 --- a/lib/com_err/parse.y +++ b/lib/com_err/parse.y @@ -44,6 +44,13 @@ void yyerror (char *s); long name2number(const char *str); extern char *yytext; + +/* This is for bison */ + +#if !defined(alloca) && !defined(HAVE_ALLOCA) +#define alloca(x) malloc(x) +#endif + %} %union { diff --git a/lib/sl/parse.y b/lib/sl/parse.y index 9dcdbb05e..efbac3f44 100644 --- a/lib/sl/parse.y +++ b/lib/sl/parse.y @@ -46,6 +46,13 @@ long name2number(const char *str); struct string_list* append_string(struct string_list*, char*); void free_string_list(struct string_list *list); unsigned string_to_flag(const char *); + +/* This is for bison */ + +#if !defined(alloca) && !defined(HAVE_ALLOCA) +#define alloca(x) malloc(x) +#endif + %} %union {