summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2018-04-18 09:52:55 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-03 07:47:41 +0200
commit75da3bb5d2dd9c78ea23288179a866108cc48734 (patch)
tree275de6624f0396369f21a44f2a6009bb125b6536 /tools
parentf1f01d50beeefc47d91f62c89a920c8ceac8cb7d (diff)
downloadlinux-stable-75da3bb5d2dd9c78ea23288179a866108cc48734.tar.gz
linux-stable-75da3bb5d2dd9c78ea23288179a866108cc48734.tar.bz2
linux-stable-75da3bb5d2dd9c78ea23288179a866108cc48734.zip
selftests/filesystems: devpts_pts included wrong header
[ Upstream commit dd4b16b4f9b1b7d9f4a185cb8222e42f3a5daf00 ] We were picking up the wrong header should use asm/ioctls.h form the kernel and not the header from the system (sys/ioctl.h). In the current code we added the correct include and we added the kernel headers path to the CFLAGS. Fixes: ce290a19609d ("selftests: add devpts selftests") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/filesystems/Makefile1
-rw-r--r--tools/testing/selftests/filesystems/devpts_pts.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/filesystems/Makefile b/tools/testing/selftests/filesystems/Makefile
index 5c7d7001ad37..129880fb42d3 100644
--- a/tools/testing/selftests/filesystems/Makefile
+++ b/tools/testing/selftests/filesystems/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
+CFLAGS += -I../../../../usr/include/
TEST_GEN_PROGS := devpts_pts
TEST_GEN_PROGS_EXTENDED := dnotify_test
diff --git a/tools/testing/selftests/filesystems/devpts_pts.c b/tools/testing/selftests/filesystems/devpts_pts.c
index 0f2d9f427944..a425840dc30c 100644
--- a/tools/testing/selftests/filesystems/devpts_pts.c
+++ b/tools/testing/selftests/filesystems/devpts_pts.c
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/ioctl.h>
+#include <asm/ioctls.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include "../kselftest.h"