diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h
index 927e2b4fd998794e132416c769306a6b20e7a549..df7495fc135b7108540acecf1129fdeef48c5b56 100644
--- a/indra/test/namedtempfile.h
+++ b/indra/test/namedtempfile.h
@@ -15,10 +15,10 @@
 #include "llerror.h"
 #include "stringize.h"
 #include <string>
-#include <boost/noncopyable.hpp>
+#include <boost/function.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/filesystem/fstream.hpp>
-#include <functional>
+#include <boost/noncopyable.hpp>
 #include <iostream>
 #include <sstream>
 #include <string_view>
@@ -41,7 +41,7 @@ class NamedTempFile: public boost::noncopyable
     // Function that accepts an ostream ref and (presumably) writes stuff to
     // it, e.g.:
     // (boost::phoenix::placeholders::arg1 << "the value is " << 17 << '\n')
-    typedef std::function<void(std::ostream&)> Streamer;
+    typedef boost::function<void(std::ostream&)> Streamer;
 
     NamedTempFile(const std::string_view& pfx,
                   const Streamer& func,