--- a/src/Navaids/NavDataCache.cxx
+++ b/src/Navaids/NavDataCache.cxx
@@ -19,6 +19,7 @@
 #include <mutex>
 #include <utility>
 #include <vector>
+#include <fcntl.h>

 #ifdef SYSTEM_SQLITE
 // the standard sqlite3.h doesn't give a way to set SQLITE_UINT64_TYPE,

--- a/src/Main/MultipleInstanceLock.cxx
+++ b/src/Main/MultipleInstanceLock.cxx
@@ -5,6 +5,7 @@

 #include <cassert>
 #include <cstdlib>
+#include <fcntl.h>


 #include "MultipleInstanceLock.hxx"
