Index: srtcore/platform_sys.h
--- srtcore/platform_sys.h.orig	2022-06-15 09:33:53.000000000 +0200
+++ srtcore/platform_sys.h	2022-06-16 09:32:07.717770000 +0200
@@ -74,6 +74,17 @@
 #endif
 
 #ifdef BSD
+
+#ifdef SRT_IMPORT_EVENT
+   #include <sys/types.h>
+   #include <sys/event.h>
+   #include <sys/time.h>
+   #include <unistd.h>
+#endif
+
+#endif
+
+#ifdef BSD
 #ifdef SRT_IMPORT_EVENT
    #include <sys/types.h>
    #include <sys/event.h>
