From eb8458587537e06df23447db56b9910a0d4e451e Mon Sep 17 00:00:00 2001
From: Nat Goodspeed <nat@lindenlab.com>
Date: Fri, 8 Sep 2023 09:50:38 -0400
Subject: [PATCH] SL-18837: NamedTempFile must be binary mode on Windows.

---
 indra/test/namedtempfile.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/indra/test/namedtempfile.h b/indra/test/namedtempfile.h
index 525a35000d3..3a994ae798c 100644
--- a/indra/test/namedtempfile.h
+++ b/indra/test/namedtempfile.h
@@ -70,7 +70,7 @@ class NamedTempFile: public boost::noncopyable
     void peep()
     {
         std::cout << "File '" << mPath << "' contains:\n";
-        boost::filesystem::ifstream reader(mPath);
+        boost::filesystem::ifstream reader(mPath, std::ios::binary);
         std::string line;
         while (std::getline(reader, line))
             std::cout << line << '\n';
@@ -103,7 +103,7 @@ class NamedTempFile: public boost::noncopyable
     {
         // Create file in a temporary place.
         mPath = temp_path(pfx, sfx);
-        boost::filesystem::ofstream out{ mPath };
+        boost::filesystem::ofstream out{ mPath, std::ios::binary };
         // Write desired content.
         func(out);
     }
-- 
GitLab