Skip to content

Commit

Permalink
um: Do not use __ptr_t type for stack_t's .ss pointer
Browse files Browse the repository at this point in the history
__ptr_t type is a glibc-specific type, while the generally
documented type is a void*. That's what other C libraries use,
too.

Signed-off-by: Hans-Werner Hilse <hwhilse@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Hans-Werner Hilse authored and Richard Weinberger committed Jun 25, 2015
1 parent 1eb7c6c commit 9a75551
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/um/os-Linux/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ void timer_init(void)

void set_sigstack(void *sig_stack, int size)
{
stack_t stack = ((stack_t) { .ss_flags = 0,
.ss_sp = (__ptr_t) sig_stack,
.ss_size = size - sizeof(void *) });
stack_t stack = {
.ss_flags = 0,
.ss_sp = sig_stack,
.ss_size = size - sizeof(void *)
};

if (sigaltstack(&stack, NULL) != 0)
panic("enabling signal stack failed, errno = %d\n", errno);
Expand Down

0 comments on commit 9a75551

Please sign in to comment.