libsa: make env_discard() public

Allow env_discard() to be used outside environment.c
This commit is contained in:
Toomas Soome 2020-08-19 15:27:09 +00:00
parent 16aabe28c6
commit 588f0a1e29
2 changed files with 2 additions and 3 deletions

View File

@ -37,8 +37,6 @@ __FBSDID("$FreeBSD$");
#include <string.h>
static void env_discard(struct env_var *ev);
struct env_var *environ = NULL;
/*
@ -194,7 +192,7 @@ unsetenv(const char *name)
return (err);
}
static void
void
env_discard(struct env_var *ev)
{
if (ev->ev_prev)

View File

@ -337,6 +337,7 @@ extern struct env_var *env_getenv(const char *name);
extern int env_setenv(const char *name, int flags,
const void *value, ev_sethook_t sethook,
ev_unsethook_t unsethook);
extern void env_discard(struct env_var *);
extern char *getenv(const char *name);
extern int setenv(const char *name, const char *value,
int overwrite);