diff --git a/tesseract_common/src/yaml_utils.cpp b/tesseract_common/src/yaml_utils.cpp
index 8ab6ea9f02f..7d927c11abc 100644
--- a/tesseract_common/src/yaml_utils.cpp
+++ b/tesseract_common/src/yaml_utils.cpp
@@ -27,6 +27,7 @@
 #include <tesseract_common/macros.h>
 TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
 #include <yaml-cpp/yaml.h>
+#include <ostream>
 TESSERACT_COMMON_IGNORE_WARNINGS_POP
 
 #include <tesseract_common/utils.h>