libbpf: Use local includes inside the library
authorSergey Kacheev <s.kacheev@gmail.com>
Wed, 2 Aug 2023 18:22:14 +0000 (21:22 +0300)
committerMartin KaFai Lau <martin.lau@kernel.org>
Fri, 4 Aug 2023 22:06:46 +0000 (15:06 -0700)
In our monrepo, we try to minimize special processing when importing
(aka vendor) third-party source code. Ideally, we try to import
directly from the repositories with the code without changing it, we
try to stick to the source code dependency instead of the artifact
dependency. In the current situation, a patch has to be made for
libbpf to fix the includes in bpf headers so that they work directly
from libbpf/src.

Signed-off-by: Sergey Kacheev <s.kacheev@gmail.com>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/CAJVhQqUg6OKq6CpVJP5ng04Dg+z=igevPpmuxTqhsR3dKvd9+Q@mail.gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/lib/bpf/bpf_tracing.h
tools/lib/bpf/usdt.bpf.h

index be076a4041ab1c68a595c052b3959d95f6019610..3803479dbe1068447a0267671a37ea6f309bcfc2 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef __BPF_TRACING_H__
 #define __BPF_TRACING_H__
 
-#include <bpf/bpf_helpers.h>
+#include "bpf_helpers.h"
 
 /* Scan the ARCH passed in from ARCH env variable (see Makefile) */
 #if defined(__TARGET_ARCH_x86)
index 0bd4c135acc21c2de62378e024e40c15bcb45c8b..f6763300b26a48b3204f83b27b0ed54b8047c384 100644 (file)
@@ -4,8 +4,8 @@
 #define __USDT_BPF_H__
 
 #include <linux/errno.h>
-#include <bpf/bpf_helpers.h>
-#include <bpf/bpf_tracing.h>
+#include "bpf_helpers.h"
+#include "bpf_tracing.h"
 
 /* Below types and maps are internal implementation details of libbpf's USDT
  * support and are subjects to change. Also, bpf_usdt_xxx() API helpers should