-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy path0001-Fix-multiple-definition-of-yylloc.patch
40 lines (35 loc) · 1.25 KB
/
0001-Fix-multiple-definition-of-yylloc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Yuntian Zhang <yt@radxa.com>
Date: Thu, 9 Jun 2022 16:46:21 +0800
Subject: [PATCH] Fix multiple definition of yylloc
Signed-off-by: Yuntian Zhang <yt@radxa.com>
---
scripts/dtc/dtc-lexer.l | 2 +-
scripts/dtc/dtc-parser.tab.c_shipped | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l
index fd825ebba6..f57c9a7e83 100644
--- a/scripts/dtc/dtc-lexer.l
+++ b/scripts/dtc/dtc-lexer.l
@@ -38,7 +38,7 @@ LINECOMMENT "//".*\n
#include "srcpos.h"
#include "dtc-parser.tab.h"
-YYLTYPE yylloc;
+extern YYLTYPE yylloc;
extern bool treesource_error;
/* CAUTION: this will stop working if we ever use yyless() or yyunput() */
diff --git a/scripts/dtc/dtc-parser.tab.c_shipped b/scripts/dtc/dtc-parser.tab.c_shipped
index aea514fa69..e70924a8ce 100644
--- a/scripts/dtc/dtc-parser.tab.c_shipped
+++ b/scripts/dtc/dtc-parser.tab.c_shipped
@@ -1202,7 +1202,7 @@ int yychar;
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
/* Location data for the lookahead symbol. */
-YYLTYPE yylloc
+extern YYLTYPE yylloc
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
= { 1, 1, 1, 1 }
# endif
--
2.36.1