diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2019-02-03 06:31:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-03 06:31:52 +0100 |
commit | 4e4e889c751ac57a217ea924ea0a03e43bd3e6d6 (patch) | |
tree | 0d118fc09dc8f6fedd33a13592ab8ad9a3ff9c4c /drivers | |
parent | 869887641f3d31f19837a34da116039a26618cb0 (diff) | |
parent | 065828d15994a4da7dde882e29aaa27d483a5029 (diff) | |
download | redot-engine-4e4e889c751ac57a217ea924ea0a03e43bd3e6d6.tar.gz |
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/unix/os_unix.cpp | 5 | ||||
-rw-r--r-- | drivers/unix/os_unix.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index ce1c183242..39a8fbc153 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -469,6 +469,11 @@ String OS_Unix::get_environment(const String &p_var) const { return ""; } +bool OS_Unix::set_environment(const String &p_var, const String &p_value) const { + + return setenv(p_var.utf8().get_data(), p_var.utf8().get_data(), /* overwrite: */ true) == 0; +} + int OS_Unix::get_processor_count() const { return sysconf(_SC_NPROCESSORS_CONF); diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index 2a23da6f28..09ab4aa1d8 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -95,6 +95,7 @@ public: virtual bool has_environment(const String &p_var) const; virtual String get_environment(const String &p_var) const; + virtual bool set_environment(const String &p_var, const String &p_value) const; virtual String get_locale() const; virtual int get_processor_count() const; |