aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authormartymac <martymac@FreeBSD.org>2018-09-02 04:22:08 +0800
committermartymac <martymac@FreeBSD.org>2018-09-02 04:22:08 +0800
commite11cab509c2fdd855aa39b4ff6ecc30a03cc69eb (patch)
tree9d9afce5632242b7439d3662744be0160b08ca76 /games
parente6c78c511bb210e5b54359dac455b9d655af70bc (diff)
downloadfreebsd-ports-gnome-e11cab509c2fdd855aa39b4ff6ecc30a03cc69eb.tar.gz
freebsd-ports-gnome-e11cab509c2fdd855aa39b4ff6ecc30a03cc69eb.tar.zst
freebsd-ports-gnome-e11cab509c2fdd855aa39b4ff6ecc30a03cc69eb.zip
Fix build with Clang7
PR: 230502 Submitted by: jbeich
Diffstat (limited to 'games')
-rw-r--r--games/flightgear/files/patch-clang7-src-AIModel-AIFlightPlanCreatePushBack.cxx15
-rw-r--r--games/flightgear/files/patch-clang7-stack_scope.diff46
2 files changed, 61 insertions, 0 deletions
diff --git a/games/flightgear/files/patch-clang7-src-AIModel-AIFlightPlanCreatePushBack.cxx b/games/flightgear/files/patch-clang7-src-AIModel-AIFlightPlanCreatePushBack.cxx
new file mode 100644
index 000000000000..d51ae84e3d80
--- /dev/null
+++ b/games/flightgear/files/patch-clang7-src-AIModel-AIFlightPlanCreatePushBack.cxx
@@ -0,0 +1,15 @@
+Fix build with clang 7:
+
+src/AIModel/AIFlightPlanCreatePushBack.cxx:96:48: error: ordered comparison between pointer and zero ('FGTaxiNode *' and 'int')
+
+--- src/AIModel/AIFlightPlanCreatePushBack.cxx.orig 2018-08-17 19:14:25.768512000 +0200
++++ src/AIModel/AIFlightPlanCreatePushBack.cxx 2018-08-17 19:14:44.343865000 +0200
+@@ -93,7 +93,7 @@
+
+ FGGroundNetwork* groundNet = dep->groundNetwork();
+ FGParking *parking = gate.parking();
+- if (parking && parking->getPushBackPoint() > 0) {
++ if (parking && parking->getPushBackPoint() != NULL) {
+ FGTaxiRoute route = groundNet->findShortestRoute(parking, parking->getPushBackPoint(), false);
+
+ int size = route.size();
diff --git a/games/flightgear/files/patch-clang7-stack_scope.diff b/games/flightgear/files/patch-clang7-stack_scope.diff
new file mode 100644
index 000000000000..8bc74ebc2b2c
--- /dev/null
+++ b/games/flightgear/files/patch-clang7-stack_scope.diff
@@ -0,0 +1,46 @@
+Fix scope of 'stack' when building with clang 7:
+
+error: reference to 'stack' is ambiguous
+
+--- src/FDM/UIUCModel/uiuc_aircraft.h.orig 2018-08-31 19:26:14.641298000 +0200
++++ src/FDM/UIUCModel/uiuc_aircraft.h 2018-08-31 19:50:35.444961000 +0200
+@@ -150,7 +150,7 @@
+ #include "uiuc_parsefile.h"
+ #include "uiuc_flapdata.h"
+
+-typedef stack :: iterator LIST;
++typedef ::stack :: iterator LIST;
+
+ /* Add more keywords here if required*/
+ enum {init_flag = 1000, geometry_flag, controlSurface_flag, controlsMixer_flag,
+--- src/FDM/UIUCModel/uiuc_parsefile.h.orig 2018-08-31 19:34:45.641135000 +0200
++++ src/FDM/UIUCModel/uiuc_parsefile.h 2018-08-31 19:35:35.903930000 +0200
+@@ -23,7 +23,7 @@
+ {
+ private:
+
+- stack commands;
++ ::stack commands;
+ ifstream file;
+ void readFile();
+
+@@ -37,7 +37,7 @@
+ void removeComments(string& inputLine);
+ string getToken(string inputLine, int tokenNo);
+ void storeCommands(string inputLine);
+- stack getCommands();
++ ::stack getCommands();
+ };
+
+ #endif // _PARSE_FILE_H_
+--- src/FDM/UIUCModel/uiuc_recorder.cpp.orig 2018-08-31 19:16:32.680030000 +0200
++++ src/FDM/UIUCModel/uiuc_recorder.cpp 2018-08-31 19:16:57.872109000 +0200
+@@ -102,7 +102,7 @@
+
+ void uiuc_recorder( double dt )
+ {
+- stack command_list;
++ ::stack command_list;
+ string linetoken;
+ // static int init = 0;
+ static int recordStep = 0;