From 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Thu, 16 May 2024 03:11:33 +0000 Subject: [PATCH] AX88772C_eeprom and ax8872c build together --- kernel/tools/perf/tests/sdt.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/tools/perf/tests/sdt.c b/kernel/tools/perf/tests/sdt.c index 5059452..ed76c69 100644 --- a/kernel/tools/perf/tests/sdt.c +++ b/kernel/tools/perf/tests/sdt.c @@ -1,13 +1,17 @@ // SPDX-License-Identifier: GPL-2.0 #include <errno.h> +#include <limits.h> #include <stdio.h> +#include <stdlib.h> +#include <unistd.h> #include <sys/epoll.h> -#include <util/evlist.h> +#include <util/symbol.h> #include <linux/filter.h> #include "tests.h" #include "debug.h" #include "probe-file.h" #include "build-id.h" +#include "util.h" /* To test SDT event, we need libelf support to scan elf binary */ #if defined(HAVE_SDT_EVENT) && defined(HAVE_LIBELF_SUPPORT) @@ -24,16 +28,16 @@ static int build_id_cache__add_file(const char *filename) { char sbuild_id[SBUILD_ID_SIZE]; - u8 build_id[BUILD_ID_SIZE]; + struct build_id bid; int err; - err = filename__read_build_id(filename, &build_id, sizeof(build_id)); + err = filename__read_build_id(filename, &bid); if (err < 0) { pr_debug("Failed to read build id of %s\n", filename); return err; } - build_id__sprintf(build_id, sizeof(build_id), sbuild_id); + build_id__sprintf(&bid, sbuild_id); err = build_id_cache__add_s(sbuild_id, filename, NULL, false, false); if (err < 0) pr_debug("Failed to add build id cache of %s\n", filename); -- Gitblit v1.6.2