--- solid/solid/backends/udisks2/udisksblock.h
+++ solid/solid/backends/udisks2/udisksblock.h
@@ -21,6 +21,7 @@
 #ifndef UDISKS2BLOCK_H
 #define UDISKS2BLOCK_H
 
+#include <sys/stat.h>
 #include <solid/ifaces/block.h>
 #include "udisksdeviceinterface.h"

--- kdecore/io/kdirwatch_p.h
+++ kdecore/io/kdirwatch_p.h
@@ -65,6 +65,7 @@
 
 #include <sys/time.h>
 #include <sys/param.h> // ino_t
+#include <sys/stat.h>
 #include <ctime>
