Skip to content

Commit

Permalink
fix musl libc build
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 27, 2024
1 parent 28e62a2 commit c931153
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ccode/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
#include <stdbool.h>
#include <stdlib.h>
#include <signal.h>
#include <execinfo.h>
#include <unistd.h>
#include <string.h>

#if __GNU_LIBRARY__
#include <execinfo.h>
#endif
typedef void (*sighandler_t)(int);
sighandler_t sigint_signal;

Expand All @@ -19,7 +21,7 @@ void block_sigint(){
void unblock_sigint(){
signal(SIGINT, sigint_signal);
}

#if __GNU_LIBRARY__
static void sigsegv_handler(int sig) {
void *array[10];
size_t size;
Expand Down Expand Up @@ -52,6 +54,10 @@ void enable_sigsegv_trace(){
sigact.sa_flags = 0;
sigaction(SIGSEGV, &sigact, NULL);
}
#else
void enable_sigsegv_trace(){}
#endif


#ifndef kill
int kill(pid_t pid, int sig);
Expand Down

0 comments on commit c931153

Please sign in to comment.