Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next
[linux-2.6-microblaze.git] / samples / bpf / tracex5_user.c
index e910dc2..9d7d79f 100644 (file)
@@ -8,6 +8,7 @@
 #include <bpf/bpf.h>
 #include <bpf/libbpf.h>
 #include "trace_helpers.h"
+#include "bpf_util.h"
 
 #ifdef __mips__
 #define        MAX_ENTRIES  6000 /* MIPS n64 syscalls start at 5000 */
@@ -24,7 +25,7 @@ static void install_accept_all_seccomp(void)
                BPF_STMT(BPF_RET+BPF_K, SECCOMP_RET_ALLOW),
        };
        struct sock_fprog prog = {
-               .len = (unsigned short)(sizeof(filter)/sizeof(filter[0])),
+               .len = (unsigned short)ARRAY_SIZE(filter),
                .filter = filter,
        };
        if (prctl(PR_SET_SECCOMP, 2, &prog))