Skip to content

Commit 99a12a3

Browse files
anakryikoborkmann
authored andcommitted
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
1 parent a9606f4 commit 99a12a3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/lib/bpf/xsk.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
#include "libbpf_internal.h"
3636
#include "xsk.h"
3737

38+
/* entire xsk.h and xsk.c is going away in libbpf 1.0, so ignore all internal
39+
* uses of deprecated APIs
40+
*/
41+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
42+
3843
#ifndef SOL_XDP
3944
#define SOL_XDP 283
4045
#endif

0 commit comments

Comments
 (0)