Commit 0cd1f847 authored by Michael Lee's avatar Michael Lee Committed by Facebook Github Bot

crt_externs.h is not available on all platforms

Summary: Different deployments of don't always have access to crt_externs.h.

Reviewed By: yfeldblum, Orvid

Differential Revision: D4480621

fbshipit-source-id: f0b18d15fa253d6ba28dee68859cf9a34bf41255
parent d1af84b6
......@@ -18,13 +18,6 @@
#include <cstdlib>
#if defined(__APPLE__)
#include <TargetConditionals.h>
#if (TARGET_OS_OSX || TARGET_OS_SIMULATOR)
#include <crt_extern.h>
#endif
#endif
extern "C" {
#ifdef _WIN32
// These are technically supposed to be defined linux/limits.h and
......@@ -41,7 +34,7 @@ int mkstemp(char* tn);
char* realpath(const char* path, char* resolved_path);
int setenv(const char* name, const char* value, int overwrite);
int unsetenv(const char* name);
#elif defined(__APPLE__) && (TARGET_OS_OSX || TARGET_OS_SIMULATOR)
#define environ (*_NSGetEnviron())
#elif defined(__APPLE__)
extern char** environ;
#endif
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment