79beb823c212212fd6a021711f958b4208130ab6
[openwrt/openwrt.git] / target / linux / uml / patches-4.9 / 002-um-Correctly-check-for-PTRACE_GETRESET-SETREGSET.patch
1 From 61e8d462457f202bf0c6393133425ad387825e22 Mon Sep 17 00:00:00 2001
2 From: Richard Weinberger <richard@nod.at>
3 Date: Thu, 6 Jul 2017 09:35:27 +0200
4 Subject: [PATCH] um: Correctly check for PTRACE_GETRESET/SETREGSET
5
6 [ Upstream commit 61e8d462457f202bf0c6393133425ad387825e22 ]
7
8 When checking for PTRACE_GETRESET/SETREGSET, make sure that
9 the correct header file is included. We need linux/ptrace.h
10 which contains all ptrace UAPI related defines.
11 Otherwise #if defined(PTRACE_GETRESET) is always false.
12
13 Cc: Florian Fainelli <f.fainelli@gmail.com>
14 Signed-off-by: Richard Weinberger <richard@nod.at>
15 ---
16 arch/x86/um/user-offsets.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 --- a/arch/x86/um/user-offsets.c
20 +++ b/arch/x86/um/user-offsets.c
21 @@ -5,7 +5,7 @@
22 #include <sys/mman.h>
23 #include <sys/user.h>
24 #define __FRAME_OFFSETS
25 -#include <asm/ptrace.h>
26 +#include <linux/ptrace.h>
27 #include <asm/types.h>
28
29 #ifdef __i386__