]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Only use unsetenv() when it is available
authorAlexander Barton <alex@barton.de>
Sun, 10 Nov 2013 16:08:41 +0000 (17:08 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 10 Nov 2013 16:08:51 +0000 (17:08 +0100)
AIX 4.3 dosn't support it, for example.

configure.ng
src/ngircd/conn.c

index e3f51cf0268a086a49c4baddd34a723cc75106ea..b9e92704e9fab7bcb1dfac7d36d63ffb2a8c0a6d 100644 (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 --
 
index 324fa4219a9d204723572e1eeb8fbf8ea1badbee..e8bfcf1c70cbbb9e848061eff7b151a2a7c8f854 100644 (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;
 }