--- a/src/tortoize-main.cpp
+++ b/src/tortoize-main.cpp
@@ -31,6 +31,7 @@
 #include <mcfp/mcfp.hpp>
 
 #include <fstream>
+#include <fcntl.h>
 
 namespace fs = std::filesystem;
 
