Skip to content

Commit 4d1a535

Browse files
Krzysztof Mazurrichardweinberger
authored andcommitted
um: Use POSIX ucontext_t instead of struct ucontext
glibc 2.26 removed the 'struct ucontext' to "improve" POSIX compliance and break programs, including User Mode Linux. Fix User Mode Linux by using POSIX ucontext_t. This fixes: arch/um/os-Linux/signal.c: In function 'hard_handler': arch/um/os-Linux/signal.c:163:22: error: dereferencing pointer to incomplete type 'struct ucontext' mcontext_t *mc = &uc->uc_mcontext; arch/x86/um/stub_segv.c: In function 'stub_segv_handler': arch/x86/um/stub_segv.c:16:13: error: dereferencing pointer to incomplete type 'struct ucontext' &uc->uc_mcontext); Cc: stable@vger.kernel.org Signed-off-by: Krzysztof Mazur <krzysiek@podlesie.net> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 288fb3d commit 4d1a535

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/um/os-Linux/signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = {
159159

160160
static void hard_handler(int sig, siginfo_t *si, void *p)
161161
{
162-
struct ucontext *uc = p;
162+
ucontext_t *uc = p;
163163
mcontext_t *mc = &uc->uc_mcontext;
164164
unsigned long pending = 1UL << sig;
165165

arch/x86/um/stub_segv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
void __attribute__ ((__section__ (".__syscall_stub")))
1111
stub_segv_handler(int sig, siginfo_t *info, void *p)
1212
{
13-
struct ucontext *uc = p;
13+
ucontext_t *uc = p;
1414

1515
GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
1616
&uc->uc_mcontext);

0 commit comments

Comments
 (0)