In file included from ../src/panfrost/perf/pan_perf.c:15:
../src/panfrost/perf/pan_perf.h:51:11: error: use of undeclared identifier 'CLOCK_MONOTONIC_RAW'
   51 |    return CLOCK_MONOTONIC_RAW;
      |           ^
../src/vulkan/wsi/wsi_common_wayland.c:1962:57: error: use of undeclared identifier 'CLOCK_MONOTONIC_RAW'
 1962 |          if (clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW)
      |                                                         ^
../src/vulkan/wsi/wsi_common_wayland.c:3601:12: error: use of undeclared identifier 'CLOCK_MONOTONIC_RAW'
 3601 |       case CLOCK_MONOTONIC_RAW:
      |            ^

--- src/panfrost/perf/pan_perf.h.orig	2026-08-05 23:22:05 UTC
+++ src/panfrost/perf/pan_perf.h
@@ -14,6 +14,11 @@
 
 #include "util/timespec.h"
 
+/* The "RAW" clocks on Linux are called "FAST" on FreeBSD */
+#if !defined(CLOCK_MONOTONIC_RAW) && defined(CLOCK_MONOTONIC_FAST)
+#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST
+#endif
+
 #if defined(__cplusplus)
 extern "C" {
 #endif
--- src/vulkan/wsi/wsi_common_wayland.c.orig	2026-01-29 17:00:57 UTC
+++ src/vulkan/wsi/wsi_common_wayland.c
@@ -68,6 +68,11 @@
 #include <sys/sysmacros.h>
 #endif
 
+/* The "RAW" clocks on Linux are called "FAST" on FreeBSD */
+#if !defined(CLOCK_MONOTONIC_RAW) && defined(CLOCK_MONOTONIC_FAST)
+#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST
+#endif
+
 struct wsi_wayland;
 
 struct wsi_wl_format {
