diff -Nur a/squashfs-tools/mksquashfs.c b/squashfs-tools/mksquashfs.c
--- a/squashfs-tools/mksquashfs.c	2017-11-14 04:44:47.000000000 +0100
+++ b/squashfs-tools/mksquashfs.c	2018-08-22 16:52:17.386482046 +0200
@@ -33,6 +33,7 @@
 #include <unistd.h>
 #include <stdio.h>
 #include <stddef.h>
+#include <sys/sysmacros.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
