Bug 964133 - Fixup FakeIPC to build on windows; r=jesup draft
authorDan Minor <dminor@mozilla.com>
Mon, 30 Jan 2017 15:37:57 -0500
changeset 552970 dfade0944c84df23580121384d2501229b78c0c6
parent 552969 57b70f5dd3a55e73de0b066f228ddf957f477c26
child 552971 76ab8e4a280912aa08a6c94e1cdfb25488df836a
push id51529
push userdminor@mozilla.com
push dateWed, 29 Mar 2017 10:22:42 +0000
reviewersjesup
bugs964133
milestone55.0a1
Bug 964133 - Fixup FakeIPC to build on windows; r=jesup MozReview-Commit-ID: 2Jm82qs4hFL
media/webrtc/trunk/gtest/FakeIPC.cpp
media/webrtc/trunk/gtest/FakeIPC.h
--- a/media/webrtc/trunk/gtest/FakeIPC.cpp
+++ b/media/webrtc/trunk/gtest/FakeIPC.cpp
@@ -1,21 +1,30 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "FakeIPC.h"
+
+#ifdef WEBRTC_WIN
+#include <Windows.h>
+#else
 #include <unistd.h>
+#endif
 
 // The implementations can't be in the .h file for some annoying reason
 
 /* static */ void
 PlatformThread:: YieldCurrentThread()
 {
+#ifdef WEBRTC_WIN
+  Sleep(1);
+#else
   sleep(1);
+#endif
 }
 
 namespace base {
 
 void AtExitManager::RegisterCallback(AtExitCallbackType func, void* param)
 {
 }
 
--- a/media/webrtc/trunk/gtest/FakeIPC.h
+++ b/media/webrtc/trunk/gtest/FakeIPC.h
@@ -1,15 +1,14 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef FAKE_IPC_H_
 #define FAKE_IPC_H_
-#include <unistd.h>
 
 class PlatformThread {
 public:
   static void YieldCurrentThread();
 };
 
 namespace base {
 class AtExitManager {