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