Module: ngircd.git Branch: master Commit: ae00c100acdb4d2d3f99524d30258d07eefcfb6d URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=ae00c...
Author: Alexander Barton alex@barton.de Date: Sun Nov 10 17:08:41 2013 +0100
Only use unsetenv() when it is available
AIX 4.3 dosn't support it, for example.
---
configure.ng | 2 +- src/ngircd/conn.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure.ng b/configure.ng index e3f51cf..b9e9270 100644 --- a/configure.ng +++ b/configure.ng @@ -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 --
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index 324fa42..e8bfcf1 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -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; }