From 6cf1a2cfe86d37d7a0a3cfc0085f8c89b04dcc82 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Sun, 22 Jun 2003 18:32:10 +1000 Subject: - (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) --- openbsd-compat/setproctitle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbsd-compat/setproctitle.c') 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; 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; -- cgit v1.2.3