Re-Gate setenv/unsetenv
authorMichael Lee <mzlee@fb.com>
Wed, 25 Jan 2017 17:36:05 +0000 (09:36 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 25 Jan 2017 17:47:58 +0000 (09:47 -0800)
Summary: `setenv`/`unsetenv` is not always declared the same way on all of the places folly is compiled.

Reviewed By: matbd

Differential Revision: D4462056

fbshipit-source-id: 6dd68f6fc5a6a435f145cbaa43bee02b5fa7170c

folly/portability/Environment.h

index ae8dc61c4f714852ac6016da44f457b949ac49cd..d69cad5c47675a7d5647a753da7d850b111aa54f 100755 (executable)
@@ -21,7 +21,8 @@
 extern "C" {
 #ifndef _WIN32
 extern char** environ;
-#endif
+#else
 int setenv(const char* name, const char* value, int overwrite);
 int unsetenv(const char* name);
+#endif
 }