mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
05e2ec601b
commit
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
|
||||
|
||||
Reference in New Issue
Block a user