Skip to content

Commit

Permalink
bpf: Provide a linux/types.h override for bpf selftests.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
David S. Miller committed May 11, 2017
1 parent 228b032 commit 0a5539f
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/testing/selftests/bpf/Makefile
Original file line number Diff line number Diff line change
@@ -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 $@
6 changes: 6 additions & 0 deletions tools/testing/selftests/bpf/include/uapi/linux/types.h
Original file line number Diff line number Diff line change
@@ -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 */

0 comments on commit 0a5539f

Please sign in to comment.