Patchwork [5/5] coroutine-sigaltstack.c: Use stack_t, not struct sigaltstack

login
register
mail settings
Submitter Kevin Wolf
Date Nov. 30, 2012, 1:02 p.m.
Message ID <1354280549-5954-6-git-send-email-kwolf@redhat.com>
Download mbox | patch
Permalink /patch/202940/
State New
Headers show

Comments

Kevin Wolf - Nov. 30, 2012, 1:02 p.m.
From: Peter Maydell <peter.maydell@linaro.org>

Use the POSIX-specified stack_t type as the argument to sigaltstack()
rather than the legacy struct sigaltstack. This allows us to compile
on MacOSX with --with-coroutine=sigaltstack.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 coroutine-sigaltstack.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
index 861e878..39dbaa5 100644
--- a/coroutine-sigaltstack.c
+++ b/coroutine-sigaltstack.c
@@ -171,8 +171,8 @@  static Coroutine *coroutine_new(void)
     CoroutineThreadState *coTS;
     struct sigaction sa;
     struct sigaction osa;
-    struct sigaltstack ss;
-    struct sigaltstack oss;
+    stack_t ss;
+    stack_t oss;
     sigset_t sigs;
     sigset_t osigs;
     jmp_buf old_env;