--- a/tools/vgimportdevices.c
+++ b/tools/vgimportdevices.c
@@ -15,6 +15,7 @@
 #include "tools.h"
 #include "lib/cache/lvmcache.h"
 #include "lib/device/device_id.h"
+#include <sys/file.h>
 
 struct vgimportdevices_params {
 	uint32_t added_devices;
