diff --git a/src/Scripting/NasalFlightPlan.cxx b/src/Scripting/NasalFlightPlan.cxx
index 76a2397d1..202aa30f6 100644
--- a/src/Scripting/NasalFlightPlan.cxx
+++ b/src/Scripting/NasalFlightPlan.cxx
@@ -22,6 +22,7 @@
 
 #include <algorithm>
 #include <cstring>
+#include <optional>
 
 #include "NasalFlightPlan.hxx"