diff --git a/components/detournavigator/findsmoothpath.hpp b/components/detournavigator/findsmoothpath.hpp
index 07d3054e19..2e63340578 100644
--- a/components/detournavigator/findsmoothpath.hpp
+++ b/components/detournavigator/findsmoothpath.hpp
@@ -18,6 +18,7 @@
 
 #include <cassert>
 #include <vector>
+#include <functional>
 
 class dtNavMesh;