build: add version number to filenames
[openwrt/staging/yousong.git] / package / network / utils / nftables / patches / 201-parser-rename-VERSION-token-to-IPHDRVERSION.patch
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
5
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.
9
10 Signed-off-by: Steven Barth <cyrus@openwrt.org>
11 ---
12 src/parser_bison.y | 6 +++---
13 src/scanner.l | 2 +-
14 2 files changed, 4 insertions(+), 4 deletions(-)
15
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"
20
21 %token IP "ip"
22 -%token VERSION "version"
23 +%token IPHDRVERSION "version"
24 %token HDRLENGTH "hdrlength"
25 %token TOS "tos"
26 %token LENGTH "length"
27 @@ -1947,7 +1947,7 @@ ip_hdr_expr : IP ip_hdr_field
28 }
29 ;
30
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
37 }
38 ;
39
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; }
45 --- a/src/scanner.l
46 +++ b/src/scanner.l
47 @@ -349,7 +349,7 @@ addrstring ({macaddr}|{ip4addr}|{ip6addr
48 "operation" { return OPERATION; }
49
50 "ip" { return IP; }
51 -"version" { return VERSION; }
52 +"version" { return IPHDRVERSION; }
53 "hdrlength" { return HDRLENGTH; }
54 "tos" { return TOS; }
55 "length" { return LENGTH; }