--- a/src/mount_image.c
+++ b/src/mount_image.c
@@ -52,6 +52,7 @@
#include <sys/time.h>
#include <unistd.h>
#include <utime.h>
+#include <linux/fs.h>
#include "wimlib/blob_table.h"
#include "wimlib/dentry.h"