From aed953b49acb19e309b6d5f9e294d194562c3174 Mon Sep 17 00:00:00 2001 From: Led Date: Wed, 19 Jun 2024 23:18:23 +0300 Subject: [PATCH] otpbp_os: update list_env_vars/0 --- src/otpbp_os.erl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/otpbp_os.erl b/src/otpbp_os.erl index c8526f24..edfa99a2 100644 --- a/src/otpbp_os.erl +++ b/src/otpbp_os.erl @@ -13,6 +13,12 @@ -export([list_env_vars/0]). -endif. +-ifndef(HAVE_os__list_env_vars_0). +-ifdef(HAVE_os__env_0). +-import(os, [env/0]). +-endif. +-endif. + -ifndef(HAVE_os__cmd_2). cmd(Cmd, Opts) when is_atom(Cmd) -> cmd_(atom_to_list(Cmd), Opts); cmd(Cmd, Opts) -> @@ -89,12 +95,9 @@ flush_until_down(Port, MonRef) -> -endif. -ifndef(HAVE_os__list_env_vars_0). --ifdef(HAVE_os__env_0). -list_env_vars() -> os:env(). --else. list_env_vars() -> env(). -endif. --endif. + -ifndef(HAVE_os__env_0). -ifdef(HAVE_os__list_env_vars_0). env() -> os:list_env_vars().