Wrap copy_environment_blacklist() in #ifdef

It's only needed for USE_PAM or HAVE_CYGWIN cases and will cause compiler
warnings otherwise.
This commit is contained in:
Damien Miller 2020-01-21 12:32:16 +11:00
parent 10ecc647fc
commit a8bd5fdbdb
1 changed files with 2 additions and 0 deletions

View File

@ -946,6 +946,7 @@ read_etc_default_login(char ***env, u_int *envsize, uid_t uid)
}
#endif /* HAVE_ETC_DEFAULT_LOGIN */
#if defined(USE_PAM) || defined(HAVE_CYGWIN)
static void
copy_environment_blacklist(char **source, char ***env, u_int *envsize,
const char *blacklist)
@ -973,6 +974,7 @@ copy_environment_blacklist(char **source, char ***env, u_int *envsize,
free(var_name);
}
}
#endif /* defined(USE_PAM) || defined(HAVE_CYGWIN) */
#ifdef HAVE_CYGWIN
static void