]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
um: Use POSIX ucontext_t instead of struct ucontext
authorKrzysztof Mazur <krzysiek@podlesie.net>
Wed, 15 Nov 2017 10:12:39 +0000 (11:12 +0100)
committerRichard Weinberger <richard@nod.at>
Mon, 19 Feb 2018 18:38:51 +0000 (19:38 +0100)
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>
arch/um/os-Linux/signal.c
arch/x86/um/stub_segv.c

index a86d7cc2c2d82fa7d0e5c13d1f3188efcd660fba..a5c0c909c48b103cef8abdee7dcfd9a58ba266e5 100644 (file)
@@ -159,7 +159,7 @@ static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = {
 
 static void hard_handler(int sig, siginfo_t *si, void *p)
 {
-       struct ucontext *uc = p;
+       ucontext_t *uc = p;
        mcontext_t *mc = &uc->uc_mcontext;
        unsigned long pending = 1UL << sig;
 
index 1518d2805ae81733eb0629989f4d39ae595502c2..fd6825537b97aaaf5d5ea4dea6d52e2341344c3b 100644 (file)
@@ -10,7 +10,7 @@
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_segv_handler(int sig, siginfo_t *info, void *p)
 {
-       struct ucontext *uc = p;
+       ucontext_t *uc = p;
 
        GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
                              &uc->uc_mcontext);