diff --git a/contrib/dtc/dtc-lexer.l b/contrib/dtc/dtc-lexer.l index d142de59f93..96c2fcef1aa 100644 --- a/contrib/dtc/dtc-lexer.l +++ b/contrib/dtc/dtc-lexer.l @@ -38,6 +38,8 @@ LINECOMMENT "//".*\n #include "srcpos.h" #include "dtc-parser.tab.h" +YYLTYPE yylloc; + #define YY_USER_ACTION \ { \ yylloc.file = srcpos_file; \ diff --git a/contrib/dtc/dtc-parser.y b/contrib/dtc/dtc-parser.y index 31c14d7c91c..4411aed4af7 100644 --- a/contrib/dtc/dtc-parser.y +++ b/contrib/dtc/dtc-parser.y @@ -18,7 +18,6 @@ * USA */ -%locations %{ #include @@ -26,6 +25,8 @@ #include "dtc.h" #include "srcpos.h" +YYLTYPE yylloc; + extern int yylex(void); extern void yyerror(char const *s);