summaryrefslogtreecommitdiff
path: root/user/kbuild/fix-nodes-newline-escape.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/kbuild/fix-nodes-newline-escape.patch')
-rw-r--r--user/kbuild/fix-nodes-newline-escape.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/user/kbuild/fix-nodes-newline-escape.patch b/user/kbuild/fix-nodes-newline-escape.patch
new file mode 100644
index 000000000..7f61e87fd
--- /dev/null
+++ b/user/kbuild/fix-nodes-newline-escape.patch
@@ -0,0 +1,18 @@
+Without this patch, the newline is swallowed and
+the generated 'nodes.c' will not be compilable.
+
+The bug is in whatever code parses this file, but
+this may be the only occurrence of this behavior.
+
+diff -ur a/src/kash/nodes.c.pat b/src/kash/nodes.c.pat
+--- a/src/kash/nodes.c.pat 2023-10-30 22:27:23.308897026 +0000
++++ b/src/kash/nodes.c.pat 2023-10-30 22:27:36.781294302 +0000
+@@ -77,7 +77,7 @@
+ #ifdef KASH_SEPARATE_PARSER_ALLOCATOR
+ if (n != NULL) {
+ unsigned refs = pstackretain(n->pblock);
+- TRACE2((psh, "copyfunc: %p - %u refs\n", n->pblock, refs)); K_NOREF(refs);
++ TRACE2((psh, "copyfunc: %p - %u refs\\n", n->pblock, refs)); K_NOREF(refs);
+ }
+ return n;
+ #else