mirror of
https://git.freebsd.org/ports.git
synced 2025-06-25 06:30:29 -04:00
Building libunwind with clang results in multiple errors: setjmp/siglongjmp.c:111:48: error: incompatible pointer to integer conversion passing 'unw_word_t *' (aka 'unsigned long *') to parameter of type 'unw_word_t' (aka 'unsigned long'); remove & [-Wint-conversion] if (unw_set_reg (&c, UNW_REG_EH + 2, &wp[JB_MASK]) < 0) ^~~~~~~~~~~~ ../include/libunwind-common.h:283:56: note: passing argument to parameter here extern int unw_set_reg (unw_cursor_t *, int, unw_word_t); ^ dwarf/Gparser.c:901:5: error: call to undeclared function '_Ux86_64_stash_frame'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] tdep_stash_frame (c, rs); ^ ../include/tdep-x86_64/libunwind_i.h:246:41: note: expanded from macro 'tdep_stash_frame' #define tdep_stash_frame UNW_OBJ(stash_frame) ^ The first error is because the syntax is indeed wrong, the '&' should be removed. The second error is because tdep_stash_frame() is only declared for Linux in libunwind_i.h, but it is used in Gparser.c. Declare it unconditionally to fix the problem. PR: 265519 Approved by: sunpoet (maintainer) MFH: 2022Q3
11 lines
455 B
C
11 lines
455 B
C
--- src/setjmp/siglongjmp.c.orig 2020-11-10 16:14:18 UTC
|
|
+++ src/setjmp/siglongjmp.c
|
|
@@ -108,7 +108,7 @@ siglongjmp (sigjmp_buf env, int val)
|
|
&& unw_set_reg (&c, UNW_REG_EH + 3, wp[JB_MASK + 1]) < 0))
|
|
abort ();
|
|
#elif defined(__FreeBSD__)
|
|
- if (unw_set_reg (&c, UNW_REG_EH + 2, &wp[JB_MASK]) < 0)
|
|
+ if (unw_set_reg (&c, UNW_REG_EH + 2, wp[JB_MASK]) < 0)
|
|
abort();
|
|
#else
|
|
#error Port me
|