summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysif.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysif.c b/sysif.c
index 6bf69715..45bbde17 100644
--- a/sysif.c
+++ b/sysif.c
@@ -1398,6 +1398,8 @@ val getenv_wrap(val name)
return result;
}
+#if HAVE_SETENV
+
static val setenv_wrap(val name, val value, val overwrite)
{
val self = lit("setenv");
@@ -1442,6 +1444,8 @@ static val unsetenv_wrap(val name)
return name;
}
+#endif
+
#if HAVE_POLL
static val poll_wrap(val poll_list, val timeout_in)
@@ -2861,8 +2865,10 @@ void sysif_init(void)
reg_fun(intern(lit("pipe"), user_package), func_n0(pipe_wrap));
#endif
reg_fun(intern(lit("getenv"), user_package), func_n1(getenv_wrap));
+#if HAVE_SETENV
reg_fun(intern(lit("setenv"), user_package), func_n3o(setenv_wrap, 2));
reg_fun(intern(lit("unsetenv"), user_package), func_n1(unsetenv_wrap));
+#endif
#if HAVE_GETEUID
reg_fun(intern(lit("getuid"), user_package), func_n0(getuid_wrap));