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 240937 62af62f4f0a4c8adef51fc3ae515f4a0dada764c
parent 240936 1e4f975958f2ee83619a287e512f4e7f2abf1038
child 240938 70ffdede9e2bba10442df671fa8ae10938508162
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs1101037
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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 {