From 4ad163239aa6609c1d1551917658d3320c417d80 Mon Sep 17 00:00:00 2001 From: Rafal Jaworowski Date: Sun, 28 Feb 2010 22:06:07 +0000 Subject: [PATCH] Let dtc build with FreeBSD yacc/lex. Sponsored by: The FreeBSD Foundation --- contrib/dtc/dtc-lexer.l | 2 ++ contrib/dtc/dtc-parser.y | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) 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);