Skip to content

Commit

Permalink
libbpf: Prevent deprecation warnings in xsk.c
Browse files Browse the repository at this point in the history
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
  • Loading branch information
anakryiko committed Nov 26, 2021
1 parent 316b60f commit 07e4e0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/xsk.c
Expand Up @@ -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
Expand Down

0 comments on commit 07e4e0c

Please sign in to comment.