hermes | inspector | Don't include posix headers on non-posix systems
Summary: Changelog: [Internal] Hermes inspector includes pthreads, arpa and sys headers on all OSes that would break vanilla Windows builds. This diff adds a check for posix-compliance before inclusion (Note: this ignores all push blocking failures!) Reviewed By: dulinriley Differential Revision: D20564449 fbshipit-source-id: 8e264bc3104065dc4315bb291e8560609fe65184
This commit is contained in:
Родитель
05e2ec601b
Коммит
79c69bea02
|
@ -7,6 +7,23 @@
|
|||
|
||||
#include "AutoAttachUtils.h"
|
||||
|
||||
#ifdef _WINDOWS
|
||||
namespace facebook {
|
||||
namespace hermes {
|
||||
namespace inspector {
|
||||
namespace chrome {
|
||||
bool isNetworkInspected(
|
||||
const std::string &,
|
||||
const std::string &,
|
||||
const std::string &) {
|
||||
return false;
|
||||
}
|
||||
} // namespace chrome
|
||||
} // namespace inspector
|
||||
} // namespace hermes
|
||||
} // namespace facebook
|
||||
|
||||
#else
|
||||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
@ -130,3 +147,5 @@ bool isNetworkInspected(
|
|||
} // namespace inspector
|
||||
} // namespace hermes
|
||||
} // namespace facebook
|
||||
|
||||
#endif
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
|
||||
#include "SerialExecutor.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace hermes {
|
||||
namespace inspector {
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#ifndef __ANDROID__
|
||||
#ifdef _WINDOWS
|
||||
#include <thread>
|
||||
#elif !defined(__ANDROID__)
|
||||
#include <pthread.h>
|
||||
#include <thread>
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче