--- a/squashfs-tools/pseudo.c
+++ b/squashfs-tools/pseudo.c
@@ -31,6 +31,7 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/wait.h>
+#include <sys/stat.h>
 
 #include "pseudo.h"