Only use unsetenv() when it is available

AIX 4.3 dosn't support it, for example.
This commit is contained in:
Alexander Barton 2013-11-10 17:08:41 +01:00
parent 61d1c864c5
commit ae00c100ac
2 changed files with 3 additions and 1 deletions

View File

@ -189,7 +189,7 @@ AC_CHECK_FUNCS([ \
AC_CHECK_FUNCS_ONCE([ \
arc4random arc4random_stir gai_strerror getaddrinfo getnameinfo inet_aton
sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \
strtok_r waitpid])
strtok_r unsetenv waitpid])
# -- Configuration options --

View File

@ -152,7 +152,9 @@ my_sd_listen_fds(void)
if (!e || !*e)
return -1;
count = atoi(e);
#ifdef HAVE_UNSETENV
unsetenv("LISTEN_FDS");
#endif
return count;
}