summaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 92091e5..7b95e49 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -255,6 +255,14 @@ int wait4pid(int pid)
}
#endif
+#ifdef L_xsetenv
+void xsetenv(const char *key, const char *value)
+{
+ if(setenv(key, value, 1))
+ bb_error_msg_and_die(bb_msg_memory_exhausted);
+}
+#endif
+
#ifdef L_itoa
// Convert unsigned integer to ascii, writing into supplied buffer. A
// truncated result is always null terminated (unless buflen is 0), and