--- dom/plugins/ipc/PluginMessageUtils.cpp
+++ dom/plugins/ipc/PluginMessageUtils.cpp
@@ -114,6 +114,7 @@ MediateRace(const RPCChannel::Message& parent,
   }
 }
 
+#if defined(OS_LINUX)
 static string
 ReplaceAll(const string& haystack, const string& needle, const string& with)
 {
@@ -127,6 +128,7 @@ ReplaceAll(const string& haystack, const string& needle, const string& with)
 
   return munged;
 }
+#endif
 
 string
 MungePluginDsoPath(const string& path)
