diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/vm/Makefile | 2 | ||||
-rw-r--r-- | tools/testing/selftests/vm/userfaultfd.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/testing/selftests/vm/Makefile b/tools/testing/selftests/vm/Makefile index d36fab7d8ebd..949e275f11a6 100644 --- a/tools/testing/selftests/vm/Makefile +++ b/tools/testing/selftests/vm/Makefile @@ -1,6 +1,6 @@ # Makefile for vm selftests -CFLAGS = -Wall +CFLAGS = -Wall -I ../../../../usr/include $(EXTRA_CFLAGS) BINARIES = compaction_test BINARIES += hugepage-mmap BINARIES += hugepage-shm diff --git a/tools/testing/selftests/vm/userfaultfd.c b/tools/testing/selftests/vm/userfaultfd.c index 7c1d958857d2..59d145f20918 100644 --- a/tools/testing/selftests/vm/userfaultfd.c +++ b/tools/testing/selftests/vm/userfaultfd.c @@ -64,8 +64,9 @@ #include <sys/syscall.h> #include <sys/ioctl.h> #include <pthread.h> -#include "../../../../include/uapi/linux/userfaultfd.h" +#include <linux/userfaultfd.h> +#ifndef __NR_userfaultfd #ifdef __x86_64__ #define __NR_userfaultfd 323 #elif defined(__i386__) @@ -77,6 +78,7 @@ #else #error "missing __NR_userfaultfd definition" #endif +#endif static unsigned long nr_cpus, nr_pages, nr_pages_per_cpu, page_size; |