[PATCH v2 2/4] compat/regex: include alloca.h before undef it
- From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
- Date
- Apr 24, 2020, 15:12 UTC
- Message-ID
- <290ba923b5ee5bcaa4801454b6692deb532bd681.1587740959.git.congdanhqx@gmail.com>
- In-Reply-To
- <cover.1587740959.git.congdanhqx@gmail.com>
Somewhere later in the code, we indirectly include alloca.h which will define alloca again, thus create a warning about redefinition of a preprocessor.
Include it prior to define alloca in order to not define it again.
Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com> --- compat/regex/regex.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/compat/regex/regex.c b/compat/regex/regex.c index f3e03a9eab..4bef75a716 100644 --- a/compat/regex/regex.c +++ b/compat/regex/regex.c @@ -62,6 +62,7 @@ #include <stdint.h> #ifdef GAWK +#include <alloca.h> #undef alloca #define alloca alloca_is_bad_you_should_never_use_it #endif
-- 2.26.2.384.g435bf60bd5