libweave: Fix compile errors on Chrome OS

Need to include <algorithm> explicitly to use std::find and
std::replace. On Android these included indirectly by some other
library headers, but on Chrome OS they are not and this breaks
the build.

Change-Id: I590e00aaaa3796a6614147bd5acb404c2fe078d6
Reviewed-by: Robert Ginda <>
diff --git a/src/ b/src/
index cd28de9..108c6aa 100644
--- a/src/
+++ b/src/
@@ -4,6 +4,8 @@
 #include "src/config.h"
+#include <algorithm>
 #include <set>
 #include <base/bind.h>
diff --git a/src/test/ b/src/test/
index df8ccc0..2176e7f 100644
--- a/src/test/
+++ b/src/test/
@@ -4,6 +4,8 @@
 #include <weave/test/unittest_utils.h>
+#include <algorithm>
 #include <base/json/json_reader.h>
 #include <base/json/json_writer.h>
 #include <base/logging.h>