diff -upr sudo-1.8.21p2.orig/plugins/sudoers/regress/env_match/check_env_pattern.c sudo-1.8.21p2/plugins/sudoers/regress/env_match/check_env_pattern.c
--- sudo-1.8.21p2.orig/plugins/sudoers/regress/env_match/check_env_pattern.c	2017-11-29 01:10:35.358774973 +0100
+++ sudo-1.8.21p2/plugins/sudoers/regress/env_match/check_env_pattern.c	2017-11-29 01:11:13.399217545 +0100
@@ -27,6 +27,8 @@
 #include <time.h>		/* for sudo_compat.h */
 #include <grp.h>		/* for sudo_compat.h */
 
+#include <sys/stat.h>
+
 #include "sudoers.h"
 
 __dso_public int main(int argc, char *argv[]);
