From: Alexander Barton Date: Sun, 10 Nov 2013 16:08:41 +0000 (+0100) Subject: Only use unsetenv() when it is available X-Git-Tag: rel-22-rc1~92 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=ae00c100acdb4d2d3f99524d30258d07eefcfb6d;hp=61d1c864c55291c1f5f81f284e984b044fe2722f Only use unsetenv() when it is available AIX 4.3 dosn't support it, for example. --- diff --git a/configure.ng b/configure.ng index e3f51cf0..b9e92704 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 324fa421..e8bfcf1c 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; }