Bug 964133 - Fixup FakeIPC to build on windows; r=jesup
MozReview-Commit-ID: 2Jm82qs4hFL
--- 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 {