Skip to content

Commit

Permalink
iFix yet another unreasonably failing compilation issue with sa_sigac…
Browse files Browse the repository at this point in the history
…tion,

this time on macOS.
  • Loading branch information
eliotmiranda committed Jun 21, 2024
1 parent 57c6fbf commit 53d94a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions platforms/unix/vm/sqUnixVMProfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,13 @@ static long pc_buffer_index;
static long pc_buffer_size;
static long pc_buffer_wrapped;

// The necessity of casting weither the uap argument to ucontext_t *, or to
// declare the parameter as ucontext_t * and cast the assignment to sa_sigaction
// is so wilfully toxic it beggars belief.
static void
pcbufferSIGPROFhandler(int sig, siginfo_t *info, ucontext_t *uap)
pcbufferSIGPROFhandler(int sig, siginfo_t *info, void *uap)
{
pc_buffer[pc_buffer_index] = uap->_PC_IN_UCONTEXT;
pc_buffer[pc_buffer_index] = ((ucontext_t *)uap)->_PC_IN_UCONTEXT;
if (++pc_buffer_index >= pc_buffer_size) {
pc_buffer_index = 0;
pc_buffer_wrapped = 1;
Expand Down

0 comments on commit 53d94a9

Please sign in to comment.