From 0aab853ca6507dd8243c5dcba63bcab067477bcc Mon Sep 17 00:00:00 2001 From: Tobias Kortkamp Date: Sun, 29 Mar 2020 10:16:27 +0000 Subject: [PATCH] games/dangerdeep: Unbreak build on FreeBSD >= 12.1 src/subsim.cpp:1739:2: error: reference to 'thread' is ambiguous thread::auto_ptr mmusic(new music(use_sound)); ^ src/thread.h:37:7: note: candidate found by name lookup is 'thread' class thread ^ /usr/include/c++/v1/__threading_support:397:24: note: candidate found by name lookup is 'std::__1::thread' class _LIBCPP_TYPE_VIS thread; ^ 2 warnings and 1 error generated. http://beefy6.nyi.freebsd.org/data/121amd64-default/529299/logs/errors/dangerdeep-0.3.0_14.log --- games/dangerdeep/files/patch-src__subsim.cpp | 15 ++++++++++++--- games/dangerdeep/files/patch-src_coastmap.h | 20 ++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 games/dangerdeep/files/patch-src_coastmap.h diff --git a/games/dangerdeep/files/patch-src__subsim.cpp b/games/dangerdeep/files/patch-src__subsim.cpp index e6df17a9ad00..e8155a51c6a4 100644 --- a/games/dangerdeep/files/patch-src__subsim.cpp +++ b/games/dangerdeep/files/patch-src__subsim.cpp @@ -1,6 +1,6 @@ ---- ./src/subsim.cpp.orig 2007-06-11 11:16:23.000000000 -0400 -+++ ./src/subsim.cpp 2014-08-11 09:56:15.000000000 -0400 -@@ -31,6 +31,7 @@ +--- src/subsim.cpp.orig 2007-06-11 15:16:23 UTC ++++ src/subsim.cpp +@@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, #else #include "oglext/OglExt.h" #endif @@ -8,3 +8,12 @@ #include #include #include +@@ -1735,7 +1736,7 @@ int mymain(list& args) + glEnable(GL_LIGHT0); + + // create and start thread for music handling. +- thread::auto_ptr mmusic(new music(use_sound)); ++ ::thread::auto_ptr mmusic(new music(use_sound)); + mmusic->start(); + + reset_loading_screen(); diff --git a/games/dangerdeep/files/patch-src_coastmap.h b/games/dangerdeep/files/patch-src_coastmap.h new file mode 100644 index 000000000000..b71f6a5a6517 --- /dev/null +++ b/games/dangerdeep/files/patch-src_coastmap.h @@ -0,0 +1,20 @@ +--- src/coastmap.h.orig 2020-03-29 09:04:12 UTC ++++ src/coastmap.h +@@ -151,7 +151,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: +@@ -163,7 +163,7 @@ class coastmap + } + }; + +- thread::auto_ptr myworker; ++ ::thread::auto_ptr myworker; + void construction_threaded(); + + public: