summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
Diffstat (limited to 'samples')
-rw-r--r--samples/bpf/bpf_load.c2
-rw-r--r--samples/bpf/bpf_load.h2
-rw-r--r--samples/bpf/cpustat_user.c2
-rw-r--r--samples/bpf/lathist_user.c2
-rw-r--r--samples/bpf/load_sock_ops.c2
-rw-r--r--samples/bpf/lwt_len_hist_user.c2
-rw-r--r--samples/bpf/map_perf_test_user.c2
-rw-r--r--samples/bpf/sock_example.h1
-rw-r--r--samples/bpf/sockex1_user.c2
-rw-r--r--samples/bpf/sockex2_user.c2
-rw-r--r--samples/bpf/sockex3_user.c2
-rw-r--r--samples/bpf/syscall_tp_user.c2
-rw-r--r--samples/bpf/tc_l2_redirect_user.c2
-rw-r--r--samples/bpf/test_cgrp2_array_pin.c2
-rw-r--r--samples/bpf/test_current_task_under_cgroup_user.c2
-rw-r--r--samples/bpf/test_lru_dist.c2
-rw-r--r--samples/bpf/test_map_in_map_user.c2
-rw-r--r--samples/bpf/test_overhead_user.c2
-rw-r--r--samples/bpf/test_probe_write_user_user.c2
-rw-r--r--samples/bpf/trace_output_user.c2
-rw-r--r--samples/bpf/tracex1_user.c2
-rw-r--r--samples/bpf/tracex2_user.c2
-rw-r--r--samples/bpf/tracex3_user.c2
-rw-r--r--samples/bpf/tracex4_user.c2
-rw-r--r--samples/bpf/tracex5_user.c2
-rw-r--r--samples/bpf/tracex6_user.c2
-rw-r--r--samples/bpf/tracex7_user.c2
-rw-r--r--samples/bpf/xdp_fwd_user.c2
-rw-r--r--samples/bpf/xdp_monitor_user.c2
-rw-r--r--samples/bpf/xdp_redirect_cpu_user.c2
-rw-r--r--samples/bpf/xdp_redirect_map_user.c2
-rw-r--r--samples/bpf/xdp_redirect_user.c2
-rw-r--r--samples/bpf/xdp_router_ipv4_user.c2
-rw-r--r--samples/bpf/xdp_tx_iptunnel_user.c2
-rw-r--r--samples/bpf/xdpsock_user.c2
35 files changed, 34 insertions, 35 deletions
diff --git a/samples/bpf/bpf_load.c b/samples/bpf/bpf_load.c
index a6b290de5632..89161c9ed466 100644
--- a/samples/bpf/bpf_load.c
+++ b/samples/bpf/bpf_load.c
@@ -24,7 +24,7 @@
24#include <poll.h> 24#include <poll.h>
25#include <ctype.h> 25#include <ctype.h>
26#include <assert.h> 26#include <assert.h>
27#include "libbpf.h" 27#include <bpf/bpf.h>
28#include "bpf_load.h" 28#include "bpf_load.h"
29#include "perf-sys.h" 29#include "perf-sys.h"
30 30
diff --git a/samples/bpf/bpf_load.h b/samples/bpf/bpf_load.h
index f9da59bca0cc..814894a12974 100644
--- a/samples/bpf/bpf_load.h
+++ b/samples/bpf/bpf_load.h
@@ -2,7 +2,7 @@
2#ifndef __BPF_LOAD_H 2#ifndef __BPF_LOAD_H
3#define __BPF_LOAD_H 3#define __BPF_LOAD_H
4 4
5#include "libbpf.h" 5#include <bpf/bpf.h>
6 6
7#define MAX_MAPS 32 7#define MAX_MAPS 32
8#define MAX_PROGS 32 8#define MAX_PROGS 32
diff --git a/samples/bpf/cpustat_user.c b/samples/bpf/cpustat_user.c
index 2b4cd1ae57c5..869a99406dbf 100644
--- a/samples/bpf/cpustat_user.c
+++ b/samples/bpf/cpustat_user.c
@@ -17,7 +17,7 @@
17#include <sys/resource.h> 17#include <sys/resource.h>
18#include <sys/wait.h> 18#include <sys/wait.h>
19 19
20#include "libbpf.h" 20#include <bpf/bpf.h>
21#include "bpf_load.h" 21#include "bpf_load.h"
22 22
23#define MAX_CPU 8 23#define MAX_CPU 8
diff --git a/samples/bpf/lathist_user.c b/samples/bpf/lathist_user.c
index 6477bad5b4e2..c8e88cc84e61 100644
--- a/samples/bpf/lathist_user.c
+++ b/samples/bpf/lathist_user.c
@@ -10,7 +10,7 @@
10#include <stdlib.h> 10#include <stdlib.h>
11#include <signal.h> 11#include <signal.h>
12#include <linux/bpf.h> 12#include <linux/bpf.h>
13#include "libbpf.h" 13#include <bpf/bpf.h>
14#include "bpf_load.h" 14#include "bpf_load.h"
15 15
16#define MAX_ENTRIES 20 16#define MAX_ENTRIES 20
diff --git a/samples/bpf/load_sock_ops.c b/samples/bpf/load_sock_ops.c
index e5da6cf71a3e..8ecb41ea0c03 100644
--- a/samples/bpf/load_sock_ops.c
+++ b/samples/bpf/load_sock_ops.c
@@ -8,7 +8,7 @@
8#include <stdlib.h> 8#include <stdlib.h>
9#include <string.h> 9#include <string.h>
10#include <linux/bpf.h> 10#include <linux/bpf.h>
11#include "libbpf.h" 11#include <bpf/bpf.h>
12#include "bpf_load.h" 12#include "bpf_load.h"
13#include <unistd.h> 13#include <unistd.h>
14#include <errno.h> 14#include <errno.h>
diff --git a/samples/bpf/lwt_len_hist_user.c b/samples/bpf/lwt_len_hist_user.c
index 7fcb94c09112..587b68b1f8dd 100644
--- a/samples/bpf/lwt_len_hist_user.c
+++ b/samples/bpf/lwt_len_hist_user.c
@@ -9,7 +9,7 @@
9#include <errno.h> 9#include <errno.h>
10#include <arpa/inet.h> 10#include <arpa/inet.h>
11 11
12#include "libbpf.h" 12#include <bpf/bpf.h>
13#include "bpf_util.h" 13#include "bpf_util.h"
14 14
15#define MAX_INDEX 64 15#define MAX_INDEX 64
diff --git a/samples/bpf/map_perf_test_user.c b/samples/bpf/map_perf_test_user.c
index 519d9af4b04a..38b7b1a96cc2 100644
--- a/samples/bpf/map_perf_test_user.c
+++ b/samples/bpf/map_perf_test_user.c
@@ -21,7 +21,7 @@
21#include <arpa/inet.h> 21#include <arpa/inet.h>
22#include <errno.h> 22#include <errno.h>
23 23
24#include "libbpf.h" 24#include <bpf/bpf.h>
25#include "bpf_load.h" 25#include "bpf_load.h"
26 26
27#define TEST_BIT(t) (1U << (t)) 27#define TEST_BIT(t) (1U << (t))
diff --git a/samples/bpf/sock_example.h b/samples/bpf/sock_example.h
index 772d5dad8465..a27d7579bc73 100644
--- a/samples/bpf/sock_example.h
+++ b/samples/bpf/sock_example.h
@@ -9,7 +9,6 @@
9#include <net/if.h> 9#include <net/if.h>
10#include <linux/if_packet.h> 10#include <linux/if_packet.h>
11#include <arpa/inet.h> 11#include <arpa/inet.h>
12#include "libbpf.h"
13 12
14static inline int open_raw_sock(const char *name) 13static inline int open_raw_sock(const char *name)
15{ 14{
diff --git a/samples/bpf/sockex1_user.c b/samples/bpf/sockex1_user.c
index 2be935c2627d..93ec01c56104 100644
--- a/samples/bpf/sockex1_user.c
+++ b/samples/bpf/sockex1_user.c
@@ -2,7 +2,7 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <assert.h> 3#include <assert.h>
4#include <linux/bpf.h> 4#include <linux/bpf.h>
5#include "libbpf.h" 5#include <bpf/bpf.h>
6#include "bpf_load.h" 6#include "bpf_load.h"
7#include "sock_example.h" 7#include "sock_example.h"
8#include <unistd.h> 8#include <unistd.h>
diff --git a/samples/bpf/sockex2_user.c b/samples/bpf/sockex2_user.c
index 44fe0805b087..1d5c6e9a6d27 100644
--- a/samples/bpf/sockex2_user.c
+++ b/samples/bpf/sockex2_user.c
@@ -2,7 +2,7 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <assert.h> 3#include <assert.h>
4#include <linux/bpf.h> 4#include <linux/bpf.h>
5#include "libbpf.h" 5#include <bpf/bpf.h>
6#include "bpf_load.h" 6#include "bpf_load.h"
7#include "sock_example.h" 7#include "sock_example.h"
8#include <unistd.h> 8#include <unistd.h>
diff --git a/samples/bpf/sockex3_user.c b/samples/bpf/sockex3_user.c
index 495ee02e2fb7..5ba3ae9d180b 100644
--- a/samples/bpf/sockex3_user.c
+++ b/samples/bpf/sockex3_user.c
@@ -2,7 +2,7 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <assert.h> 3#include <assert.h>
4#include <linux/bpf.h> 4#include <linux/bpf.h>
5#include "libbpf.h" 5#include <bpf/bpf.h>
6#include "bpf_load.h" 6#include "bpf_load.h"
7#include "sock_example.h" 7#include "sock_example.h"
8#include <unistd.h> 8#include <unistd.h>
diff --git a/samples/bpf/syscall_tp_user.c b/samples/bpf/syscall_tp_user.c
index 9169d3207f18..1a1d0059a277 100644
--- a/samples/bpf/syscall_tp_user.c
+++ b/samples/bpf/syscall_tp_user.c
@@ -16,7 +16,7 @@
16#include <assert.h> 16#include <assert.h>
17#include <stdbool.h> 17#include <stdbool.h>
18#include <sys/resource.h> 18#include <sys/resource.h>
19#include "libbpf.h" 19#include <bpf/bpf.h>
20#include "bpf_load.h" 20#include "bpf_load.h"
21 21
22/* This program verifies bpf attachment to tracepoint sys_enter_* and sys_exit_*. 22/* This program verifies bpf attachment to tracepoint sys_enter_* and sys_exit_*.
diff --git a/samples/bpf/tc_l2_redirect_user.c b/samples/bpf/tc_l2_redirect_user.c
index 28995a776560..7ec45c3e8f56 100644
--- a/samples/bpf/tc_l2_redirect_user.c
+++ b/samples/bpf/tc_l2_redirect_user.c
@@ -13,7 +13,7 @@
13#include <string.h> 13#include <string.h>
14#include <errno.h> 14#include <errno.h>
15 15
16#include "libbpf.h" 16#include <bpf/bpf.h>
17 17
18static void usage(void) 18static void usage(void)
19{ 19{
diff --git a/samples/bpf/test_cgrp2_array_pin.c b/samples/bpf/test_cgrp2_array_pin.c
index 8a1b8b5d8def..242184292f59 100644
--- a/samples/bpf/test_cgrp2_array_pin.c
+++ b/samples/bpf/test_cgrp2_array_pin.c
@@ -14,7 +14,7 @@
14#include <errno.h> 14#include <errno.h>
15#include <fcntl.h> 15#include <fcntl.h>
16 16
17#include "libbpf.h" 17#include <bpf/bpf.h>
18 18
19static void usage(void) 19static void usage(void)
20{ 20{
diff --git a/samples/bpf/test_current_task_under_cgroup_user.c b/samples/bpf/test_current_task_under_cgroup_user.c
index 65b5fb51c1db..4be4874ca2bc 100644
--- a/samples/bpf/test_current_task_under_cgroup_user.c
+++ b/samples/bpf/test_current_task_under_cgroup_user.c
@@ -9,7 +9,7 @@
9#include <stdio.h> 9#include <stdio.h>
10#include <linux/bpf.h> 10#include <linux/bpf.h>
11#include <unistd.h> 11#include <unistd.h>
12#include "libbpf.h" 12#include <bpf/bpf.h>
13#include "bpf_load.h" 13#include "bpf_load.h"
14#include <linux/bpf.h> 14#include <linux/bpf.h>
15#include "cgroup_helpers.h" 15#include "cgroup_helpers.h"
diff --git a/samples/bpf/test_lru_dist.c b/samples/bpf/test_lru_dist.c
index 73c357142268..eec3e2509ce8 100644
--- a/samples/bpf/test_lru_dist.c
+++ b/samples/bpf/test_lru_dist.c
@@ -21,7 +21,7 @@
21#include <stdlib.h> 21#include <stdlib.h>
22#include <time.h> 22#include <time.h>
23 23
24#include "libbpf.h" 24#include <bpf/bpf.h>
25#include "bpf_util.h" 25#include "bpf_util.h"
26 26
27#define min(a, b) ((a) < (b) ? (a) : (b)) 27#define min(a, b) ((a) < (b) ? (a) : (b))
diff --git a/samples/bpf/test_map_in_map_user.c b/samples/bpf/test_map_in_map_user.c
index 1aca18539d8d..e308858f7bcf 100644
--- a/samples/bpf/test_map_in_map_user.c
+++ b/samples/bpf/test_map_in_map_user.c
@@ -13,7 +13,7 @@
13#include <errno.h> 13#include <errno.h>
14#include <stdlib.h> 14#include <stdlib.h>
15#include <stdio.h> 15#include <stdio.h>
16#include "libbpf.h" 16#include <bpf/bpf.h>
17#include "bpf_load.h" 17#include "bpf_load.h"
18 18
19#define PORT_A (map_fd[0]) 19#define PORT_A (map_fd[0])
diff --git a/samples/bpf/test_overhead_user.c b/samples/bpf/test_overhead_user.c
index e1d35e07a10e..6caf47afa635 100644
--- a/samples/bpf/test_overhead_user.c
+++ b/samples/bpf/test_overhead_user.c
@@ -19,7 +19,7 @@
19#include <string.h> 19#include <string.h>
20#include <time.h> 20#include <time.h>
21#include <sys/resource.h> 21#include <sys/resource.h>
22#include "libbpf.h" 22#include <bpf/bpf.h>
23#include "bpf_load.h" 23#include "bpf_load.h"
24 24
25#define MAX_CNT 1000000 25#define MAX_CNT 1000000
diff --git a/samples/bpf/test_probe_write_user_user.c b/samples/bpf/test_probe_write_user_user.c
index bf8e3a9f3067..045eb5e30f54 100644
--- a/samples/bpf/test_probe_write_user_user.c
+++ b/samples/bpf/test_probe_write_user_user.c
@@ -3,7 +3,7 @@
3#include <assert.h> 3#include <assert.h>
4#include <linux/bpf.h> 4#include <linux/bpf.h>
5#include <unistd.h> 5#include <unistd.h>
6#include "libbpf.h" 6#include <bpf/bpf.h>
7#include "bpf_load.h" 7#include "bpf_load.h"
8#include <sys/socket.h> 8#include <sys/socket.h>
9#include <string.h> 9#include <string.h>
diff --git a/samples/bpf/trace_output_user.c b/samples/bpf/trace_output_user.c
index da98be721001..4837d73edefe 100644
--- a/samples/bpf/trace_output_user.c
+++ b/samples/bpf/trace_output_user.c
@@ -18,7 +18,7 @@
18#include <sys/mman.h> 18#include <sys/mman.h>
19#include <time.h> 19#include <time.h>
20#include <signal.h> 20#include <signal.h>
21#include "libbpf.h" 21#include <libbpf.h>
22#include "bpf_load.h" 22#include "bpf_load.h"
23#include "perf-sys.h" 23#include "perf-sys.h"
24#include "trace_helpers.h" 24#include "trace_helpers.h"
diff --git a/samples/bpf/tracex1_user.c b/samples/bpf/tracex1_user.c
index 3dcb475fb135..af8c20608ab5 100644
--- a/samples/bpf/tracex1_user.c
+++ b/samples/bpf/tracex1_user.c
@@ -2,7 +2,7 @@
2#include <stdio.h> 2#include <stdio.h>
3#include <linux/bpf.h> 3#include <linux/bpf.h>
4#include <unistd.h> 4#include <unistd.h>
5#include "libbpf.h" 5#include <bpf/bpf.h>
6#include "bpf_load.h" 6#include "bpf_load.h"
7 7
8int main(int ac, char **argv) 8int main(int ac, char **argv)
diff --git a/samples/bpf/tracex2_user.c b/samples/bpf/tracex2_user.c
index efb5e61918df..1a81e6a5c2ea 100644
--- a/samples/bpf/tracex2_user.c
+++ b/samples/bpf/tracex2_user.c
@@ -7,7 +7,7 @@
7#include <string.h> 7#include <string.h>
8#include <sys/resource.h> 8#include <sys/resource.h>
9 9
10#include "libbpf.h" 10#include <bpf/bpf.h>
11#include "bpf_load.h" 11#include "bpf_load.h"
12#include "bpf_util.h" 12#include "bpf_util.h"
13 13
diff --git a/samples/bpf/tracex3_user.c b/samples/bpf/tracex3_user.c
index fe372239d505..6c6b10f4c3ee 100644
--- a/samples/bpf/tracex3_user.c
+++ b/samples/bpf/tracex3_user.c
@@ -13,7 +13,7 @@
13#include <linux/bpf.h> 13#include <linux/bpf.h>
14#include <sys/resource.h> 14#include <sys/resource.h>
15 15
16#include "libbpf.h" 16#include <bpf/bpf.h>
17#include "bpf_load.h" 17#include "bpf_load.h"
18#include "bpf_util.h" 18#include "bpf_util.h"
19 19
diff --git a/samples/bpf/tracex4_user.c b/samples/bpf/tracex4_user.c
index 22c644f1f4c3..14625c898e43 100644
--- a/samples/bpf/tracex4_user.c
+++ b/samples/bpf/tracex4_user.c
@@ -14,7 +14,7 @@
14#include <linux/bpf.h> 14#include <linux/bpf.h>
15#include <sys/resource.h> 15#include <sys/resource.h>
16 16
17#include "libbpf.h" 17#include <bpf/bpf.h>
18#include "bpf_load.h" 18#include "bpf_load.h"
19 19
20struct pair { 20struct pair {
diff --git a/samples/bpf/tracex5_user.c b/samples/bpf/tracex5_user.c
index 4e2774b731f0..c4ab91c89494 100644
--- a/samples/bpf/tracex5_user.c
+++ b/samples/bpf/tracex5_user.c
@@ -5,7 +5,7 @@
5#include <linux/filter.h> 5#include <linux/filter.h>
6#include <linux/seccomp.h> 6#include <linux/seccomp.h>
7#include <sys/prctl.h> 7#include <sys/prctl.h>
8#include "libbpf.h" 8#include <bpf/bpf.h>
9#include "bpf_load.h" 9#include "bpf_load.h"
10#include <sys/resource.h> 10#include <sys/resource.h>
11 11
diff --git a/samples/bpf/tracex6_user.c b/samples/bpf/tracex6_user.c
index 89ab8d408474..4bb3c830adb2 100644
--- a/samples/bpf/tracex6_user.c
+++ b/samples/bpf/tracex6_user.c
@@ -16,7 +16,7 @@
16#include <unistd.h> 16#include <unistd.h>
17 17
18#include "bpf_load.h" 18#include "bpf_load.h"
19#include "libbpf.h" 19#include <bpf/bpf.h>
20#include "perf-sys.h" 20#include "perf-sys.h"
21 21
22#define SAMPLE_PERIOD 0x7fffffffffffffffULL 22#define SAMPLE_PERIOD 0x7fffffffffffffffULL
diff --git a/samples/bpf/tracex7_user.c b/samples/bpf/tracex7_user.c
index 8a52ac492e8b..ea6dae78f0df 100644
--- a/samples/bpf/tracex7_user.c
+++ b/samples/bpf/tracex7_user.c
@@ -3,7 +3,7 @@
3#include <stdio.h> 3#include <stdio.h>
4#include <linux/bpf.h> 4#include <linux/bpf.h>
5#include <unistd.h> 5#include <unistd.h>
6#include "libbpf.h" 6#include <bpf/bpf.h>
7#include "bpf_load.h" 7#include "bpf_load.h"
8 8
9int main(int argc, char **argv) 9int main(int argc, char **argv)
diff --git a/samples/bpf/xdp_fwd_user.c b/samples/bpf/xdp_fwd_user.c
index 9c6606f57126..a87a2048ed32 100644
--- a/samples/bpf/xdp_fwd_user.c
+++ b/samples/bpf/xdp_fwd_user.c
@@ -26,7 +26,7 @@
26 26
27#include "bpf_load.h" 27#include "bpf_load.h"
28#include "bpf_util.h" 28#include "bpf_util.h"
29#include "libbpf.h" 29#include <bpf/bpf.h>
30 30
31 31
32static int do_attach(int idx, int fd, const char *name) 32static int do_attach(int idx, int fd, const char *name)
diff --git a/samples/bpf/xdp_monitor_user.c b/samples/bpf/xdp_monitor_user.c
index 05ad3f590c91..bf09b5188acd 100644
--- a/samples/bpf/xdp_monitor_user.c
+++ b/samples/bpf/xdp_monitor_user.c
@@ -26,7 +26,7 @@ static const char *__doc_err_only__=
26#include <net/if.h> 26#include <net/if.h>
27#include <time.h> 27#include <time.h>
28 28
29#include "libbpf.h" 29#include <bpf/bpf.h>
30#include "bpf_load.h" 30#include "bpf_load.h"
31#include "bpf_util.h" 31#include "bpf_util.h"
32 32
diff --git a/samples/bpf/xdp_redirect_cpu_user.c b/samples/bpf/xdp_redirect_cpu_user.c
index 23744a8aaf21..f6efaefd485b 100644
--- a/samples/bpf/xdp_redirect_cpu_user.c
+++ b/samples/bpf/xdp_redirect_cpu_user.c
@@ -28,7 +28,7 @@ static const char *__doc__ =
28 * use bpf/libbpf.h), but cannot as (currently) needed for XDP 28 * use bpf/libbpf.h), but cannot as (currently) needed for XDP
29 * attaching to a device via bpf_set_link_xdp_fd() 29 * attaching to a device via bpf_set_link_xdp_fd()
30 */ 30 */
31#include "libbpf.h" 31#include <bpf/bpf.h>
32#include "bpf_load.h" 32#include "bpf_load.h"
33 33
34#include "bpf_util.h" 34#include "bpf_util.h"
diff --git a/samples/bpf/xdp_redirect_map_user.c b/samples/bpf/xdp_redirect_map_user.c
index 7eae07d7293e..4445e76854b5 100644
--- a/samples/bpf/xdp_redirect_map_user.c
+++ b/samples/bpf/xdp_redirect_map_user.c
@@ -24,7 +24,7 @@
24 24
25#include "bpf_load.h" 25#include "bpf_load.h"
26#include "bpf_util.h" 26#include "bpf_util.h"
27#include "libbpf.h" 27#include <bpf/bpf.h>
28 28
29static int ifindex_in; 29static int ifindex_in;
30static int ifindex_out; 30static int ifindex_out;
diff --git a/samples/bpf/xdp_redirect_user.c b/samples/bpf/xdp_redirect_user.c
index b701b5c21342..81a69e36cb78 100644
--- a/samples/bpf/xdp_redirect_user.c
+++ b/samples/bpf/xdp_redirect_user.c
@@ -24,7 +24,7 @@
24 24
25#include "bpf_load.h" 25#include "bpf_load.h"
26#include "bpf_util.h" 26#include "bpf_util.h"
27#include "libbpf.h" 27#include <bpf/bpf.h>
28 28
29static int ifindex_in; 29static int ifindex_in;
30static int ifindex_out; 30static int ifindex_out;
diff --git a/samples/bpf/xdp_router_ipv4_user.c b/samples/bpf/xdp_router_ipv4_user.c
index 6296741c1fbd..b2b4dfa776c8 100644
--- a/samples/bpf/xdp_router_ipv4_user.c
+++ b/samples/bpf/xdp_router_ipv4_user.c
@@ -16,7 +16,7 @@
16#include <sys/socket.h> 16#include <sys/socket.h>
17#include <unistd.h> 17#include <unistd.h>
18#include "bpf_load.h" 18#include "bpf_load.h"
19#include "libbpf.h" 19#include <bpf/bpf.h>
20#include <arpa/inet.h> 20#include <arpa/inet.h>
21#include <fcntl.h> 21#include <fcntl.h>
22#include <poll.h> 22#include <poll.h>
diff --git a/samples/bpf/xdp_tx_iptunnel_user.c b/samples/bpf/xdp_tx_iptunnel_user.c
index f0a787268a87..a4ccc33adac0 100644
--- a/samples/bpf/xdp_tx_iptunnel_user.c
+++ b/samples/bpf/xdp_tx_iptunnel_user.c
@@ -18,7 +18,7 @@
18#include <unistd.h> 18#include <unistd.h>
19#include <time.h> 19#include <time.h>
20#include "bpf_load.h" 20#include "bpf_load.h"
21#include "libbpf.h" 21#include <bpf/bpf.h>
22#include "bpf_util.h" 22#include "bpf_util.h"
23#include "xdp_tx_iptunnel_common.h" 23#include "xdp_tx_iptunnel_common.h"
24 24
diff --git a/samples/bpf/xdpsock_user.c b/samples/bpf/xdpsock_user.c
index 4b8a7cf3e63b..7fe60f6f7d53 100644
--- a/samples/bpf/xdpsock_user.c
+++ b/samples/bpf/xdpsock_user.c
@@ -38,7 +38,7 @@
38 38
39#include "bpf_load.h" 39#include "bpf_load.h"
40#include "bpf_util.h" 40#include "bpf_util.h"
41#include "libbpf.h" 41#include <bpf/bpf.h>
42 42
43#include "xdpsock.h" 43#include "xdpsock.h"
44 44