diff options
author | Darren Tucker <dtucker@zip.com.au> | 2003-06-22 18:32:10 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2003-06-22 18:32:10 +1000 |
commit | 6cf1a2cfe86d37d7a0a3cfc0085f8c89b04dcc82 (patch) | |
tree | 6b2fddde8647173692319bf886bcc45fecb2790c | |
parent | e0194e52ca533eef87e3799ff987f83eab7eadcf (diff) |
- (dtucker) [openbsd-compat/setproctitle.c] Ensure SPT_TYPE is defined before
testing its value.
When HAVE_SETPROCTITLE is defined (at least on NetBSD, gcc 2.95.3) the test
"#if SPT_TYPE == SPT_REUSEARGV" is not true (probably because SPT_TYPE or
SPT_REUSEARGV is not defined). This results in the following build error:
$ gcc [flags] setproctitle.c
setproctitle.c: In function `compat_init_setproctitle':
setproctitle.c:102: `argv_start' undeclared (first use in this function)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | openbsd-compat/setproctitle.c | 2 |
2 files changed, 4 insertions, 2 deletions
@@ -4,6 +4,8 @@ | |||
4 | [reconfigure.sh] | 4 | [reconfigure.sh] |
5 | missing $SUDO; from dtucker@zip.com.au | 5 | missing $SUDO; from dtucker@zip.com.au |
6 | - (dtucker) [regress/authorized_keys_root] Remove temp data file from CVS. | 6 | - (dtucker) [regress/authorized_keys_root] Remove temp data file from CVS. |
7 | - (dtucker) [openbsd-compat/setproctitle.c] Ensure SPT_TYPE is defined before | ||
8 | testing its value. | ||
7 | 9 | ||
8 | 20030618 | 10 | 20030618 |
9 | - (djm) OpenBSD CVS Sync | 11 | - (djm) OpenBSD CVS Sync |
@@ -567,4 +569,4 @@ | |||
567 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 569 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
568 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 570 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
569 | 571 | ||
570 | $Id: ChangeLog,v 1.2817 2003/06/22 02:33:27 dtucker Exp $ | 572 | $Id: ChangeLog,v 1.2818 2003/06/22 08:32:10 dtucker Exp $ |
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index f05cb0e8c..b41100fc6 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c | |||
@@ -62,7 +62,7 @@ static size_t argv_env_len = 0; | |||
62 | void | 62 | void |
63 | compat_init_setproctitle(int argc, char *argv[]) | 63 | compat_init_setproctitle(int argc, char *argv[]) |
64 | { | 64 | { |
65 | #if SPT_TYPE == SPT_REUSEARGV | 65 | #if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV |
66 | extern char **environ; | 66 | extern char **environ; |
67 | char *lastargv = NULL; | 67 | char *lastargv = NULL; |
68 | char **envp = environ; | 68 | char **envp = environ; |