aboutsummaryrefslogtreecommitdiff
path: root/games
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2013-09-14 03:55:20 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2013-09-14 03:55:20 +0000
commit2f96a2d218cde6131b73e514e8c9ad6e78ba07e1 (patch)
treef70b4bd791fdbd1aef46063a62f151a19127cc41 /games
parent601fd8e61d72196dcc05700fbcb16a82e307fad1 (diff)
downloadports-2f96a2d218cde6131b73e514e8c9ad6e78ba07e1.tar.gz
ports-2f96a2d218cde6131b73e514e8c9ad6e78ba07e1.zip
Fix build with clang/libc++
Notes
Notes: svn path=/head/; revision=327217
Diffstat (limited to 'games')
-rw-r--r--games/toycars/files/patch-toycars-src-CarGame.cpp16
-rw-r--r--games/toycars/files/patch-toycars-src-HotPotatoGame.cpp17
2 files changed, 33 insertions, 0 deletions
diff --git a/games/toycars/files/patch-toycars-src-CarGame.cpp b/games/toycars/files/patch-toycars-src-CarGame.cpp
new file mode 100644
index 000000000000..1e71ba374f47
--- /dev/null
+++ b/games/toycars/files/patch-toycars-src-CarGame.cpp
@@ -0,0 +1,16 @@
+--- toycars/src/CarGame.cpp.orig 2009-03-28 16:37:48.000000000 +0300
++++ toycars/src/CarGame.cpp 2013-09-14 07:36:19.958228083 +0400
+@@ -48,13 +48,6 @@
+ return NULL;
+ }
+ #endif
+-#ifndef drand48
+-const double kInvRandomRange = 1.0 / RAND_MAX;
+-double drand48()
+-{
+- return random() * kInvRandomRange;
+-}
+-#endif
+
+ #ifndef INFINITY
+ #define INFINITY 1e20
diff --git a/games/toycars/files/patch-toycars-src-HotPotatoGame.cpp b/games/toycars/files/patch-toycars-src-HotPotatoGame.cpp
new file mode 100644
index 000000000000..ef2ecd7f0d04
--- /dev/null
+++ b/games/toycars/files/patch-toycars-src-HotPotatoGame.cpp
@@ -0,0 +1,17 @@
+--- toycars/src/HotPotatoGame.cpp.orig 2009-03-21 14:17:43.000000000 +0300
++++ toycars/src/HotPotatoGame.cpp 2013-09-14 07:52:54.279227416 +0400
+@@ -18,13 +18,7 @@
+ #include "glf.h"
+ #include "TcPreferences.h"
+
+-/* When using MINGW (-mno-cygwin), srandom/random isn't defined */
+-#ifndef seed48
+-unsigned short * seed48(unsigned short xseed[3]);
+-#endif
+-#ifndef drand48
+-double drand48();
+-#endif
++#include <stdlib.h>
+
+ const double kExplosionSoundFrequency = 44.1e3; // Hz
+