fix games/dangerdeep build with libc++ 10.0, adapted from FreeBSD

ok patrick@
This commit is contained in:
naddy 2021-01-08 18:43:37 +00:00
parent 5e5e1263d4
commit 141b9faf82
2 changed files with 36 additions and 4 deletions

View File

@ -1,4 +1,5 @@
$OpenBSD: patch-src_coastmap_h,v 1.1 2017/04/30 08:24:33 espie Exp $
$OpenBSD: patch-src_coastmap_h,v 1.2 2021/01/08 18:43:37 naddy Exp $
Index: src/coastmap.h
--- src/coastmap.h.orig
+++ src/coastmap.h
@@ -90,7 +90,7 @@ class coastsegment (public)
@ -10,3 +11,21 @@ $OpenBSD: patch-src_coastmap_h,v 1.1 2017/04/30 08:24:33 espie Exp $
// some attributes used for map reading/processing
std::vector<Uint8> themap; // pixel data of map file, y points up, like in OpenGL
@@ -148,7 +148,7 @@ class coastmap
void process_coastline(int x, int y);
void process_segment(int x, int y);
- class worker : public thread
+ class worker : public ::thread
{
coastmap& cm;
public:
@@ -160,7 +160,7 @@ class coastmap
}
};
- thread::auto_ptr<worker> myworker;
+ ::thread::auto_ptr<worker> myworker;
void construction_threaded();
public:

View File

@ -1,12 +1,25 @@
$OpenBSD: patch-src_game_h,v 1.1 2017/04/30 08:56:45 espie Exp $
$OpenBSD: patch-src_game_h,v 1.2 2021/01/08 18:43:37 naddy Exp $
Index: src/game.h
--- src/game.h.orig
+++ src/game.h
@@ -212,7 +212,7 @@ class game (protected)
@@ -210,9 +210,9 @@ class game (protected)
void simulate_objects_mt(double delta_t, unsigned idxoff, unsigned idxmod, bool record,
double& nearest_contact);
class simulate_worker : public thread
- class simulate_worker : public thread
+ class simulate_worker : public ::thread
{
- mutex mtx;
+ dd::mutex mtx;
condvar cond;
condvar condfini;
game& gm;
@@ -230,7 +230,7 @@ class game (protected)
double sync();
};
- thread::auto_ptr<simulate_worker> myworker;
+ ::thread::auto_ptr<simulate_worker> myworker;
player_info playerinfo;