]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (test_mkfds) use SYS_bpf instead of __NR_bpf
authorMasatake YAMATO <yamato@redhat.com>
Tue, 26 Sep 2023 16:01:12 +0000 (01:01 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 29 Sep 2023 20:29:15 +0000 (05:29 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
tests/helpers/test_mkfds.c

index b8785430b26eb403634ac42b58442cb40d5a60ef..2e8e0ba29eeae2b2ccf7669c30251d6e02e18366 100644 (file)
@@ -2873,7 +2873,7 @@ static void *make_bpf_prog(const struct factory *factory, struct fdesc fdescs[],
        attr.insn_cnt = ARRAY_SIZE(insns);
        attr.license = (int64_t)(unsigned long)"GPL";
 
-       bfd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
+       bfd = syscall(SYS_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
        if (bfd < 0)
                err((errno == ENOSYS? EXIT_ENOSYS: EXIT_FAILURE),
                    "failed in bpf(BPF_PROG_LOAD)");
@@ -2967,7 +2967,7 @@ static void *make_bpf_map(const struct factory *factory, struct fdesc fdescs[],
                .max_entries = 10,
        };
 
-       bfd = syscall(__NR_bpf, BPF_MAP_CREATE, &attr, sizeof(attr));
+       bfd = syscall(SYS_bpf, BPF_MAP_CREATE, &attr, sizeof(attr));
        if (bfd < 0)
                err((errno == ENOSYS? EXIT_ENOSYS: EXIT_FAILURE),
                    "failed in bpf(BPF_MAP_CREATE)");