--- a/src/Navaids/NavDataCache.cxx
+++ b/src/Navaids/NavDataCache.cxx
@@ -31,6 +31,7 @@
 #include <stdint.h> // for int64_t
 #include <sstream>  // for std::ostringstream
 #include <mutex>
+#include <fcntl.h>
 
 #ifdef SYSTEM_SQLITE
 // the standard sqlite3.h doesn't give a way to set SQLITE_UINT64_TYPE,
