--- ./include/sudo_compat.h.orig
+++ ./include/sudo_compat.h
@@ -25,6 +25,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <stddef.h>	/* for rsize_t */
+#include <sys/types.h> /* for id_t */
 
 /*
  * Macros and functions that may be missing on some operating systems.
