selftests: breakpoints: fix compile error on breakpoint_test_arm64
authorSumit Semwal <sumit.semwal@linaro.org>
Mon, 23 Oct 2017 07:42:22 +0000 (13:12 +0530)
committerShuah Khan <shuahkh@osg.samsung.com>
Wed, 15 Nov 2017 15:01:43 +0000 (08:01 -0700)
The current mainline breakpoints test for arm64 fails to compile with

breakpoint_test_arm64.c: In function ‘set_watchpoint’:
breakpoint_test_arm64.c:97:28: error: storage size of ‘dreg_state’ isn’t known
  struct user_hwdebug_state dreg_state;

Adding a direct include for asm/ptrace.h helps it to build, and passes
the test on mainline on hikey.

Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/breakpoints/breakpoint_test_arm64.c

index 960d021..2d95e5a 100644 (file)
@@ -19,6 +19,7 @@
 
 #define _GNU_SOURCE
 
+#include <asm/ptrace.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/ptrace.h>