CMakeLists: Use lib/bpf/include/uapi when building libdwarves
To avoid using /usr/include/linux/btf.h, as it has:
[acme@quaco pahole]$ grep ^# /usr/include/linux/btf.h | head -2
#ifndef __LINUX_BTF_H__
#define __LINUX_BTF_H__
[acme@quaco pahole]$
While:
[acme@quaco pahole]$ grep ^# lib/bpf/include/uapi/linux/btf.h | head -2
#ifndef _UAPI__LINUX_BTF_H__
#define _UAPI__LINUX_BTF_H__
[acme@quaco pahole]$
Then when both get included we get duplicate definitions, to avoid that
put lib/bpf/include/uapi/ first in the include path for libbdwarves.
Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 file changed