aports/main/dtc/increase_max_srcfile_depth.patch
2021-01-10 11:19:55 +00:00

16 lines
690 B
Diff

Upstream dtc has MAX_SRCFILE_DEPTH set to 100 in srcpos.c, which is max number of includes set to prevent infinite recursion.
Unfortunately some kernels require this number to be bigger, and since it's just a sanity check to detect infinite recursion it shouldn't hurt increasing it to 200.
diff --git a/srcpos.c b/srcpos.c
index f5205fb..4fdb22a 100644
--- a/srcpos.c
+++ b/srcpos.c
@@ -20,7 +20,7 @@ struct search_path {
static struct search_path *search_path_head, **search_path_tail;
/* Detect infinite include recursion. */
-#define MAX_SRCFILE_DEPTH (100)
+#define MAX_SRCFILE_DEPTH (200)
static int srcfile_depth; /* = 0 */
static char *get_dirname(const char *path)