Added setter method for environment.

This commit is contained in:
Michael Müller
2022-07-07 17:46:19 +02:00
parent 06b979729c
commit 8787274fb8

View File

@@ -18,7 +18,9 @@ public:
Environment() = default;
Libc::Env *getenv() { return _env; }
void setenv(Libc::Env *env) { Environment::get_instance().setenv(env); }
void setenv(Libc::Env *env) { _env = env; }
static void setenv(Libc::Env *env) { Environment::get_instance().setenv(env); }
static Environment& get_instance() { static Environment env;
return env;