Index: src/lib-master/test-event-stats.c
--- src/lib-master/test-event-stats.c.orig	2025-01-24 20:37:01.373222000 +0100
+++ src/lib-master/test-event-stats.c	2025-01-24 20:37:20.211175000 +0100
@@ -6,6 +6,7 @@
 #include "ioloop.h"
 #include "stats-client.h"
 #include "test-common.h"
+#include <sys/types.h>
 
 #define TST_BEGIN(test_name)				\
 	test_begin(test_name);				\
