--- a/bspatch.c	2005-08-16 17:14:00.000000000 +0000
+++ b/bspatch.c	2023-11-07 02:37:27.000000000 +0000
@@ -31,6 +31,7 @@
 __FBSDID("$FreeBSD$");
 #endif
 
+#include <sys/types.h>
 #include <bzlib.h>
 #include <stdlib.h>
 #include <stdio.h>
