OpenSSH build failure on NetBSD 1.5.2

Darren Tucker dtucker at zip.com.au
Sun Jan 19 12:11:09 EST 2003


Hi All.
	The recent setproctitle changes don't seem to work on NetBSD.  Some of
the variables are still used when the definitions are #ifdef'ed out. 
Attached patch fixes it, but I'm not sure it does it the right way.

		-Daz.

gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I..
-I../../openbsd-compat -I../../openbsd-compat/..  -DHAVE_CONFIG_H -c
../../openbsd-compat/setproctitle.c
../../openbsd-compat/setproctitle.c: In function
`compat_init_setproctitle':
../../openbsd-compat/setproctitle.c:196: `save_argc' undeclared (first
use in this function)
../../openbsd-compat/setproctitle.c:196: (Each undeclared identifier is
reported only once
../../openbsd-compat/setproctitle.c:196: for each function it appears
in.)
../../openbsd-compat/setproctitle.c:197: `save_argv' undeclared (first
use in this function)
../../openbsd-compat/setproctitle.c:215: `ps_buffer' undeclared (first
use in this function)
../../openbsd-compat/setproctitle.c:216: `ps_buffer_size' undeclared
(first use in this function)
../../openbsd-compat/setproctitle.c:223: `environ' undeclared (first use
in this function)
*** Error code 1

$ grep SETPROCTITLE config.h
/* #undef SETPROCTITLE_STRATEGY */
/* #undef SETPROCTITLE_PS_PADD
#define HAVE_SETPROCTITLE 1

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: openbsd-compat/setproctitle.c
===================================================================
RCS file: /cvs/openssh/openbsd-compat/setproctitle.c,v
retrieving revision 1.4
diff -u -r1.4 setproctitle.c
--- openbsd-compat/setproctitle.c	12 Jan 2003 23:04:59 -0000	1.4
+++ openbsd-compat/setproctitle.c	17 Jan 2003 11:10:34 -0000
@@ -51,8 +51,6 @@
 #include <sys/exec.h>
 #endif
 
-extern char **environ;
-
 /*------
  * Alternative ways of updating ps display:
  *
@@ -86,6 +84,9 @@
 #ifndef SETPROCTITLE_PS_PADDING
 # define SETPROCTITLE_PS_PADDING	' '
 #endif
+#endif /* HAVE_SETPROCTITLE */
+
+extern char **environ;
 
 /*
  * argv clobbering uses existing argv space, all other methods need a buffer
@@ -104,6 +105,7 @@
 
 extern char *__progname;
 
+#ifndef HAVE_SETPROCTITLE
 /*
  * Call this to update the ps status display to a fixed prefix plus an
  * indication of what you're currently doing passed in the argument.



More information about the openssh-unix-dev mailing list