summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/setproctitle.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-06-22 18:32:10 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-06-22 18:32:10 +1000
commit6cf1a2cfe86d37d7a0a3cfc0085f8c89b04dcc82 (patch)
tree6b2fddde8647173692319bf886bcc45fecb2790c /openbsd-compat/setproctitle.c
parente0194e52ca533eef87e3799ff987f83eab7eadcf (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)
Diffstat (limited to 'openbsd-compat/setproctitle.c')
-rw-r--r--openbsd-compat/setproctitle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c
index f05cb0e8..b41100fc 100644
--- a/openbsd-compat/setproctitle.c
+++ b/openbsd-compat/setproctitle.c
@@ -62,7 +62,7 @@ static size_t argv_env_len = 0;
void
compat_init_setproctitle(int argc, char *argv[])
{
-#if SPT_TYPE == SPT_REUSEARGV
+#if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV
extern char **environ;
char *lastargv = NULL;
char **envp = environ;