diff options
-rw-r--r-- | tools/bpf/bpftool/main.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/bpf/bpftool/main.c b/tools/bpf/bpftool/main.c index 9d01fa9de033..490f7bd54e4c 100644 --- a/tools/bpf/bpftool/main.c +++ b/tools/bpf/bpftool/main.c @@ -478,14 +478,11 @@ int main(int argc, char **argv) } if (!legacy_libbpf) { - enum libbpf_strict_mode mode; - /* Allow legacy map definitions for skeleton generation. * It will still be rejected if users use LIBBPF_STRICT_ALL * mode for loading generated skeleton. */ - mode = (__LIBBPF_STRICT_LAST - 1) & ~LIBBPF_STRICT_MAP_DEFINITIONS; - ret = libbpf_set_strict_mode(mode); + ret = libbpf_set_strict_mode(LIBBPF_STRICT_ALL & ~LIBBPF_STRICT_MAP_DEFINITIONS); if (ret) p_err("failed to enable libbpf strict mode: %d", ret); } |