diff options
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index 406838fa9c4f..e6cd62b1264b 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <fcntl.h> | 28 | #include <fcntl.h> |
29 | #include <errno.h> | 29 | #include <errno.h> |
30 | #include <asm/unistd.h> | 30 | #include <asm/unistd.h> |
31 | #include <linux/err.h> | ||
31 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
32 | #include <linux/bpf.h> | 33 | #include <linux/bpf.h> |
33 | #include <linux/list.h> | 34 | #include <linux/list.h> |
@@ -1542,3 +1543,10 @@ bpf_object__find_map_by_offset(struct bpf_object *obj, size_t offset) | |||
1542 | } | 1543 | } |
1543 | return ERR_PTR(-ENOENT); | 1544 | return ERR_PTR(-ENOENT); |
1544 | } | 1545 | } |
1546 | |||
1547 | long libbpf_get_error(const void *ptr) | ||
1548 | { | ||
1549 | if (IS_ERR(ptr)) | ||
1550 | return PTR_ERR(ptr); | ||
1551 | return 0; | ||
1552 | } | ||