]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Fix missing prototype warning for copy_environment
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Mon, 20 Jan 2020 10:56:48 +0000 (11:56 +0100)
committerDarren Tucker <dtucker@dtucker.net>
Mon, 20 Jan 2020 23:47:29 +0000 (10:47 +1100)
This function is only used in this file, and only on Cygwin, so make
it static and hide it behind HAVE_CYGWIN.  Prevents missing prototype
warning.

session.c

index 80738b927ab4c6da8e610785cdb6676bf42d57bc..431ccd83267b8b29d36c45385271593cc06515d4 100644 (file)
--- a/session.c
+++ b/session.c
@@ -974,11 +974,13 @@ copy_environment_blacklist(char **source, char ***env, u_int *envsize,
        }
 }
 
-void
+#ifdef HAVE_CYGWIN
+static void
 copy_environment(char **source, char ***env, u_int *envsize)
 {
        copy_environment_blacklist(source, env, envsize, NULL);
 }
+#endif
 
 static char **
 do_setup_env(struct ssh *ssh, Session *s, const char *shell)