This is FreeBSD. We have proper getrusage() and friends.

--- pg_stat_kcache.c.orig	2022-05-16 06:17:14 UTC
+++ pg_stat_kcache.c
@@ -17,14 +17,9 @@
 
 #include <unistd.h>
 
-#ifdef HAVE_SYS_RESOURCE_H
+#include <sys/types.h>
 #include <sys/time.h>
 #include <sys/resource.h>
-#endif
-
-#ifndef HAVE_GETRUSAGE
-#include "rusagestub.h"
-#endif
 
 #include "access/hash.h"
 #if PG_VERSION_NUM >= 90600
