summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-11-24 11:32:32 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2021-11-25 23:35:46 +0100
commit99a12a32fee4f740af2f36bb8f64e11c026f3389 (patch)
tree11186b4cb382812e51631484a0bc20872e2c4c01
parenta9606f405f2c8f24751b0a7326655a657a63ad60 (diff)
downloadlinux-stable-99a12a32fee4f740af2f36bb8f64e11c026f3389.tar.gz
linux-stable-99a12a32fee4f740af2f36bb8f64e11c026f3389.tar.bz2
linux-stable-99a12a32fee4f740af2f36bb8f64e11c026f3389.zip
libbpf: Prevent deprecation warnings in xsk.c
xsk.c is using own APIs that are marked for deprecation internally. Given xsk.c and xsk.h will be gone in libbpf 1.0, there is no reason to do public vs internal function split just to avoid deprecation warnings. So just add a pragma to silence deprecation warnings (until the code is removed completely). Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20211124193233.3115996-4-andrii@kernel.org
-rw-r--r--tools/lib/bpf/xsk.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c
index f1c29074d527..e8d94c6dd3bc 100644
--- a/tools/lib/bpf/xsk.c
+++ b/tools/lib/bpf/xsk.c
@@ -35,6 +35,11 @@
#include "libbpf_internal.h"
#include "xsk.h"
+/* entire xsk.h and xsk.c is going away in libbpf 1.0, so ignore all internal
+ * uses of deprecated APIs
+ */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
#ifndef SOL_XDP
#define SOL_XDP 283
#endif