aboutsummaryrefslogtreecommitdiffstats
path: root/games/torcs
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2013-09-15 17:47:08 +0800
committerrene <rene@FreeBSD.org>2013-09-15 17:47:08 +0800
commitc97c15dd9c18b892979fae4c411196ee392219f6 (patch)
treed0f9087a7b862edd404d93f2c95a47558fe80e9f /games/torcs
parente639c2cb74dbe68cb2f9f9b32507e1fb38fbed3c (diff)
downloadfreebsd-ports-gnome-c97c15dd9c18b892979fae4c411196ee392219f6.tar.gz
freebsd-ports-gnome-c97c15dd9c18b892979fae4c411196ee392219f6.tar.zst
freebsd-ports-gnome-c97c15dd9c18b892979fae4c411196ee392219f6.zip
Fix build with libc++
isnan() and isinf() do not like integer arguments, so remove two offending tests. These tests would always evaluate to false anyway because integers cannot express NaN nor infinity.
Diffstat (limited to 'games/torcs')
-rw-r--r--games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp b/games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp
new file mode 100644
index 000000000000..d4099d285e5a
--- /dev/null
+++ b/games/torcs/files/patch-src__modules__simu__simuv2__simu.cpp
@@ -0,0 +1,10 @@
+--- ./src/modules/simu/simuv2/simu.cpp.orig 2012-10-03 07:18:49.000000000 +0000
++++ ./src/modules/simu/simuv2/simu.cpp 2013-09-15 09:29:34.000000000 +0000
+@@ -67,7 +67,6 @@
+ if (isnan(car->ctrl->brakeCmd) || isinf(car->ctrl->brakeCmd)) car->ctrl->brakeCmd = 0;
+ if (isnan(car->ctrl->clutchCmd) || isinf(car->ctrl->clutchCmd)) car->ctrl->clutchCmd = 0;
+ if (isnan(car->ctrl->steer) || isinf(car->ctrl->steer)) car->ctrl->steer = 0;
+- if (isnan(car->ctrl->gear) || isinf(car->ctrl->gear)) car->ctrl->gear = 0;
+ #endif
+
+ /* When the car is broken try to send it on the track side */