From 39ef3618e556c605f8e23bf6d48edd1836b598a1 Mon Sep 17 00:00:00 2001 From: dtucker Date: Sun, 22 Jun 2003 08:32:10 +0000 Subject: [PATCH] - (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) --- ChangeLog | 2 ++ openbsd-compat/setproctitle.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d0c91a82..6abc3187 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ [reconfigure.sh] missing $SUDO; from dtucker@zip.com.au - (dtucker) [regress/authorized_keys_root] Remove temp data file from CVS. + - (dtucker) [openbsd-compat/setproctitle.c] Ensure SPT_TYPE is defined before + testing its value. 20030618 - (djm) OpenBSD CVS Sync 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; -- 2.45.2