Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions compiler-rt/lib/profile/InstrProfilingFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if !defined(__wasi__)
#include <signal.h>
#endif
#ifdef _MSC_VER
/* For _alloca. */
#include <malloc.h>
Expand Down
4 changes: 4 additions & 0 deletions compiler-rt/lib/profile/InstrProfilingUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ typedef uint_t uint;
#include <sys/utsname.h>
#endif

#if !defined(__wasi__)
#include <signal.h>
#endif
#include <stdlib.h>
#include <string.h>

Expand Down Expand Up @@ -462,6 +464,8 @@ COMPILER_RT_VISIBILITY void lprofInstallSignalHandler(int sig,
if (err == SIG_ERR)
PROF_WARN("Unable to install an exit signal handler for %d (errno = %d).\n",
sig, errno);
#elif defined(__wasi__)
// WASI doesn't support signal.
#else
struct sigaction sigact;
memset(&sigact, 0, sizeof(sigact));
Expand Down