From: Michael Ellerman <mpe@ellerman.id.au> Date: 2016-09-14 07:06:38
Cyril Bur [off-list ref] writes:
Its messy but I think the accepted solution for kselftests is to do:
#include "../../../../../usr/include/linux/elf.h"
which I believe will get the headers generated for the target by `make
headers_install` and therefore should match that for which the
kselftests are being compiled.
Don't put the path in the include line though, add it to CFLAGS.
See eg. tools/testing/selftests/powerpc/tm/Makefile:
tm-syscall: CFLAGS += -I../../../../../usr/include
cheers