diff --git a/Source/cmCommandArgumentParser.cxx b/Source/cmCommandArgumentParser.cxx index 5ad1688a8..d7b8df965 100644 --- a/Source/cmCommandArgumentParser.cxx +++ b/Source/cmCommandArgumentParser.cxx @@ -138,6 +138,11 @@ Modify cmCommandArgumentParser.cxx: cmCommandArgumentError(yyscanner, x) #define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + /* Make sure the parser uses standard memory allocation. The default generated parser malloc/free declarations do not work on all platforms. */ diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y index 06fd84a20..5b102341d 100644 --- a/Source/cmCommandArgumentParser.y +++ b/Source/cmCommandArgumentParser.y @@ -38,6 +38,11 @@ Modify cmCommandArgumentParser.cxx: cmCommandArgumentError(yyscanner, x) #define yyGetParser (cmCommandArgument_yyget_extra(yyscanner)) +/* Make sure malloc and free are available on QNX. */ +#ifdef __QNX__ +# include +#endif + /* Make sure the parser uses standard memory allocation. The default generated parser malloc/free declarations do not work on all platforms. */