@@ -0,0 +1,63 @@
1+From 8befa137776786829508f23dd33ab37e2b95a895 Mon Sep 17 00:00:00 2001
2+From: Poncho <poncho@spahan.ch>
3+Date: Mon, 7 Sep 2020 09:39:49 +0200
4+Subject: [PATCH] Fix building with bison 3.7
5+
6+Bison 3.7 changes how header files are included [1][2], in that instead of
7+copying and inserting the contents of a file, the file itself is included
8+(by default as '"basename.h"').
9+
10+[1] https://lists.gnu.org/archive/html/info-gnu/2020-07/msg00006.html
11+[2] https://www.gnu.org/software/bison/manual/html_node/_0025define-Summary.html
12+
13+Close: https://github.com/GoldenCheetah/GoldenCheetah/issues/3586
14+---
15+ src/Core/DataFilter.y | 3 +++
16+ src/Core/RideDB.y | 2 ++
17+ src/FileIO/JsonRideFile.y | 3 +++
18+ 3 files changed, 8 insertions(+)
19+
20+diff --git a/src/Core/DataFilter.y b/src/Core/DataFilter.y
21+index 7c5e481b0..142e80a5c 100644
22+--- a/src/Core/DataFilter.y
23++++ b/src/Core/DataFilter.y
24+@@ -49,6 +49,9 @@ extern Leaf *DataFilterroot; // root node for parsed statement
25+
26+ %}
27+
28++// generated by the scanner
29++%define api.header.include {"DataFilter_yacc.h"}
30++
31+ // Symbol can be meta or metric name
32+ %token <leaf> SYMBOL PYTHON
33+
34+diff --git a/src/Core/RideDB.y b/src/Core/RideDB.y
35+index d6da086bd..f2001e23c 100644
36+--- a/src/Core/RideDB.y
37++++ b/src/Core/RideDB.y
38+@@ -40,6 +40,8 @@ void RideDBerror(void*jc, const char *error) // used by parser aka yyerror()
39+ #define scanner jc->scanner
40+
41+ %}
42++// generated by the scanner
43++%define api.header.include {"RideDB_yacc.h"}
44+
45+ %pure-parser
46+ %lex-param { void *scanner }
47+diff --git a/src/FileIO/JsonRideFile.y b/src/FileIO/JsonRideFile.y
48+index 2cbbef9fc..d5c77a779 100644
49+--- a/src/FileIO/JsonRideFile.y
50++++ b/src/FileIO/JsonRideFile.y
51+@@ -106,6 +106,9 @@ static QString protect(const QString string)
52+
53+ %}
54+
55++// generated by the scanner
56++%define api.header.include {"JsonRideFile_yacc.h"}
57++
58+ %pure-parser
59+ %lex-param { void *scanner }
60+ %parse-param { struct JsonContext *jc }
61+--
62+2.34.1
63+