games/keeperrl: unbreak on FreeBSD 10

stdafx.h:94:20: error: redefinition of 'unique'
std::unique_ptr<T> unique(Args&&... args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); }
                   ^
stdafx.h:94:20: note: previous definition is here
std::unique_ptr<T> unique(Args&&... args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); }
                   ^
stack_printer.cpp:329:18: error: assigning to 'char *' from incompatible type 'void *'
      ss.ss_sp = (void*)alternate_stack;
                 ^~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Jan Beich 2018-08-27 17:29:28 +00:00
parent 892bb2acae
commit 256f51071a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=478238
2 changed files with 21 additions and 3 deletions

View file

@ -16,12 +16,10 @@ LICENSE_COMB= multi
LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING.txt
LICENSE_FILE_OFL11= ${WRKSRC}/data_contrib/SIL_Open_Font_License.txt
BROKEN_FreeBSD_10= needs c++14, does not build even with clang5
LIB_DEPENDS= libvorbis.so:audio/libvorbis \
libcurl.so:ftp/curl
USES= gmake localbase openal
USES= compiler:c++14-lang gmake localbase openal
USE_GITHUB= yes
GH_ACCOUNT= miki151

View file

@ -0,0 +1,20 @@
https://svnweb.freebsd.org/changeset/base/294930
stack_printer.cpp:329:18: error: assigning to 'char *' from incompatible type 'void *'
ss.ss_sp = (void*)alternate_stack;
^~~~~~~~~~~~~~~~~~~~~~
--- stack_printer.cpp.orig 2017-10-24 09:45:42 UTC
+++ stack_printer.cpp
@@ -326,7 +326,11 @@ int printStacktraceWithGdb() {
stack_t ss = {};
/* malloc is usually used here, I'm not 100% sure my static allocation
is valid but it seems to work just fine. */
+#if defined(__DragonFly__) || (defined(__FreeBSD__) && __FreeBSD__ < 11)
+ ss.ss_sp = (char*)alternate_stack;
+#else
ss.ss_sp = (void*)alternate_stack;
+#endif
ss.ss_size = SIGSTKSZ;
ss.ss_flags = 0;