1 From 20417d50a2f2c6d9ed1b22ca1195214d0c2c402d Mon Sep 17 00:00:00 2001
2 From: Steven Barth <cyrus@openwrt.org>
3 Date: Mon, 15 Dec 2014 13:58:55 +0100
4 Subject: [PATCH 1/5] parser: rename VERSION token to IPHDRVERSION
6 A token name of VERSION results in a macro being defined
7 with the same name. This prevents inclusion of config.h
8 in commonly used headers.
10 Signed-off-by: Steven Barth <cyrus@openwrt.org>
12 src/parser_bison.y | 6 +++---
14 2 files changed, 4 insertions(+), 4 deletions(-)
16 --- a/src/parser_bison.y
17 +++ b/src/parser_bison.y
18 @@ -237,7 +237,7 @@ static void location_update(struct locat
19 %token OPERATION "operation"
22 -%token VERSION "version"
23 +%token IPHDRVERSION "version"
24 %token HDRLENGTH "hdrlength"
26 %token LENGTH "length"
27 @@ -1947,7 +1947,7 @@ ip_hdr_expr : IP ip_hdr_field
31 -ip_hdr_field : VERSION { $$ = IPHDR_VERSION; }
32 +ip_hdr_field : IPHDRVERSION { $$ = IPHDR_VERSION; }
33 | HDRLENGTH { $$ = IPHDR_HDRLENGTH; }
34 | TOS { $$ = IPHDR_TOS; }
35 | LENGTH { $$ = IPHDR_LENGTH; }
36 @@ -1994,7 +1994,7 @@ ip6_hdr_expr : IP6 ip6_hdr_field
40 -ip6_hdr_field : VERSION { $$ = IP6HDR_VERSION; }
41 +ip6_hdr_field : IPHDRVERSION { $$ = IP6HDR_VERSION; }
42 | PRIORITY { $$ = IP6HDR_PRIORITY; }
43 | FLOWLABEL { $$ = IP6HDR_FLOWLABEL; }
44 | LENGTH { $$ = IP6HDR_LENGTH; }
47 @@ -349,7 +349,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr
48 "operation" { return OPERATION; }
51 -"version" { return VERSION; }
52 +"version" { return IPHDRVERSION; }
53 "hdrlength" { return HDRLENGTH; }
55 "length" { return LENGTH; }