bpf: Provide a linux/types.h override for bpf selftests.
authorDavid S. Miller <davem@davemloft.net>
Thu, 11 May 2017 19:00:50 +0000 (12:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 May 2017 19:00:50 +0000 (12:00 -0700)
We do not want to use the architecture's type.h header when
building BPF programs which are always 64-bit.

Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/include/uapi/linux/types.h [new file with mode: 0644]

index f92f27d8156f1a5b5ad47759539d2c20fa03b05b..f389b02d43a004e90aed9acd68148875af3beba2 100644 (file)
@@ -35,6 +35,7 @@ $(BPFOBJ): force
 CLANG ?= clang
 
 %.o: %.c
-       $(CLANG) -I. -I../../../include/uapi -I../../../../samples/bpf/ \
+       $(CLANG) -I. -I./include/uapi -I../../../include/uapi \
+               -I../../../../samples/bpf/ \
                -Wno-compare-distinct-pointer-types \
                -O2 -target bpf -c $< -o $@
diff --git a/tools/testing/selftests/bpf/include/uapi/linux/types.h b/tools/testing/selftests/bpf/include/uapi/linux/types.h
new file mode 100644 (file)
index 0000000..fbd16a7
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _UAPI_LINUX_TYPES_H
+#define _UAPI_LINUX_TYPES_H
+
+#include <asm-generic/int-ll64.h>
+
+#endif /* _UAPI_LINUX_TYPES_H */