diff options
author | Idan Horowitz <idan.horowitz@gmail.com> | 2021-10-28 23:33:41 +0300 |
---|---|---|
committer | Idan Horowitz <idan.horowitz@gmail.com> | 2021-12-01 21:44:11 +0200 |
commit | f415218afe008ba2de123040781c550f3cf48352 (patch) | |
tree | ccdee156f0544278eb4ae3e3f506b698ab686820 /Userland/Libraries | |
parent | d5d0eb45bf91d43f9cf9e6724300fc0f07808422 (diff) | |
download | serenity-f415218afe008ba2de123040781c550f3cf48352.zip |
Kernel+LibC: Implement sigaltstack()
This is required for compiling wine for serenity
Diffstat (limited to 'Userland/Libraries')
-rw-r--r-- | Userland/Libraries/LibC/signal.cpp | 6 | ||||
-rw-r--r-- | Userland/Libraries/LibC/signal.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/signal.cpp b/Userland/Libraries/LibC/signal.cpp index c6f213268c..3f43db5496 100644 --- a/Userland/Libraries/LibC/signal.cpp +++ b/Userland/Libraries/LibC/signal.cpp @@ -75,6 +75,12 @@ int sigaddset(sigset_t* set, int sig) return 0; } +int sigaltstack(const stack_t* ss, stack_t* old_ss) +{ + int rc = syscall(SC_sigaltstack, ss, old_ss); + __RETURN_WITH_ERRNO(rc, rc, -1); +} + int sigdelset(sigset_t* set, int sig) { if (sig < 1 || sig > 32) { diff --git a/Userland/Libraries/LibC/signal.h b/Userland/Libraries/LibC/signal.h index 5284d8bc68..e11bf80b8d 100644 --- a/Userland/Libraries/LibC/signal.h +++ b/Userland/Libraries/LibC/signal.h @@ -21,6 +21,7 @@ int sigaction(int sig, const struct sigaction* act, struct sigaction* old_act); int sigemptyset(sigset_t*); int sigfillset(sigset_t*); int sigaddset(sigset_t*, int sig); +int sigaltstack(const stack_t* ss, stack_t* old_ss); int sigdelset(sigset_t*, int sig); int sigismember(const sigset_t*, int sig); int sigprocmask(int how, const sigset_t* set, sigset_t* old_set); |