From ae9d3656860622ab40a9d824373bc13c32014bfc Mon Sep 17 00:00:00 2001 From: Russell Greene Date: Mon, 28 Oct 2024 21:24:12 -0600 Subject: [PATCH] perfetto: fix macos compile On macos, does not declare clockid_t, but it's instead in , which also includes on Linux, so just include on all UNIX platforms. Fixes: a871eabc Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12064 Tested-by: Vinson Lee Part-of: --- src/util/perf/u_perfetto.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/perf/u_perfetto.h b/src/util/perf/u_perfetto.h index 5d8d8e4f3b6..eadf7062f2e 100644 --- a/src/util/perf/u_perfetto.h +++ b/src/util/perf/u_perfetto.h @@ -25,11 +25,12 @@ #define _UTIL_PERFETTO_H #include "util/u_atomic.h" +#include "util/detect_os.h" // On Unix, pass a clockid_t to designate which clock was used to gather the timestamp // On Windows, this paramter is ignored, and it's expected that `timestamp` comes from QueryPerformanceCounter -#ifndef _WIN32 -#include +#if DETECT_OS_POSIX +#include typedef clockid_t perfetto_clock_id; #else typedef int32_t perfetto_clock_id;