ports/databases/foundationdb73-server/files/patch-flow_Platform.actor.cpp
Dmitry Wagin 3dc4928b6c databases/foundationdb*: split, update to 7.1.59 & 7.3.41
Update FoundationDB to both main supported versions, and also split
between server and client builds for convenience.

PR:		277262
Reviewed by:	dch
Sponsored by:	SkunkWerks, GmbH
2024-05-23 22:14:48 +00:00

21 lines
666 B
C++

--- flow/Platform.actor.cpp.orig 2023-09-26 04:25:05 UTC
+++ flow/Platform.actor.cpp
@@ -1979,6 +1979,9 @@ std::string epochsToGMTString(double epochs) {
}
std::vector<std::string> getEnvironmentKnobOptions() {
+#if defined(__FreeBSD__)
+ extern char** environ;
+#endif
constexpr const size_t ENVKNOB_PREFIX_LEN = sizeof(ENVIRONMENT_KNOB_OPTION_PREFIX) - 1;
std::vector<std::string> knobOptions;
#if defined(_WIN32)
@@ -1994,7 +1997,7 @@ std::vector<std::string> getEnvironmentKnobOptions() {
}
#else
char** e = nullptr;
-#ifdef __linux__
+#if defined(__linux__) || defined(__FreeBSD__)
e = environ;
#elif defined(__APPLE__)
e = *_NSGetEnviron();