diff --git a/src/Log.cxx b/src/Log.cxx
index 505ff3e4a..c4cdaab57 100644
--- a/src/Log.cxx
+++ b/src/Log.cxx
@@ -23,6 +23,8 @@
 
 #include <fmt/format.h>
 
+#include <iterator> // for std::back_inserter()
+
 static constexpr Domain exception_domain("exception");
 
 void