Bug 1101037 - Fixed dom/media/gmp compilation with mingw. r=nfroyd
authorJacek Caban <jacek@codeweavers.com>
Thu, 20 Nov 2014 10:52:44 +0100
changeset 216623 62af62f4f0a4c8adef51fc3ae515f4a0dada764c
parent 216622 1e4f975958f2ee83619a287e512f4e7f2abf1038
child 216624 70ffdede9e2bba10442df671fa8ae10938508162
push idunknown
push userunknown
push dateunknown
reviewersnfroyd
bugs1101037
milestone36.0a1
Bug 1101037 - Fixed dom/media/gmp compilation with mingw. r=nfroyd
dom/media/gmp/GMPChild.cpp
dom/media/gmp/rlz/base/memory/scoped_ptr.h
dom/media/gmp/rlz/win/lib/machine_id_win.cc
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -306,17 +306,21 @@ GMPChild::PreLoadLibraries(const std::st
 
   nsCOMPtr<nsIFile> infoFile;
   GetInfoFile(aPluginPath, infoFile);
 
   nsString path;
   infoFile->GetPath(path);
 
   std::ifstream stream;
+#ifdef _MSC_VER
   stream.open(path.get());
+#else
+  stream.open(NS_ConvertUTF16toUTF8(path).get());
+#endif
   if (!stream.good()) {
     NS_WARNING("Failure opening info file for required DLLs");
     return false;
   }
 
   do {
     std::string line;
     getline(stream, line);
--- a/dom/media/gmp/rlz/base/memory/scoped_ptr.h
+++ b/dom/media/gmp/rlz/base/memory/scoped_ptr.h
@@ -13,15 +13,15 @@
 #include "nsAutoPtr.h"
 
 template<class T>
 class scoped_array : public nsAutoArrayPtr<T> {
 public:
   scoped_array(T* t) : nsAutoArrayPtr<T>(t) {}
   void reset(T* t) {
     scoped_array<T> other(t);
-    operator=(other);
+    this->operator=(other);
   }
 };
 
 #define arraysize mozilla::ArrayLength
 
 #endif
--- a/dom/media/gmp/rlz/win/lib/machine_id_win.cc
+++ b/dom/media/gmp/rlz/win/lib/machine_id_win.cc
@@ -1,14 +1,14 @@
 // Copyright 2011 Google Inc. All Rights Reserved.
 // Use of this source code is governed by an Apache-style license that can be
 // found in the COPYING file.
 
 #include <windows.h>
-#include <Sddl.h>  // For ConvertSidToStringSidW.
+#include <sddl.h>  // For ConvertSidToStringSidW.
 #include <string>
 
 #include "base/memory/scoped_ptr.h"
 #include "base/string16.h"
 #include "rlz/lib/assert.h"
 
 namespace rlz_lib {