Thread (46 messages) 46 messages, 4 authors, 2020-05-01

[PATCH v2 2/4] compat/regex: include alloca.h before undef it

flat view
STALE2360d

From: Đoàn Trần Công Danh <hidden>
Date: 2020-04-24 15:12:46
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help