diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/openbsd-compat.h | 2 | ||||
-rw-r--r-- | openbsd-compat/setproctitle.c | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h index ec0ae516..dcb643f1 100644 --- a/openbsd-compat/openbsd-compat.h +++ b/openbsd-compat/openbsd-compat.h @@ -96,7 +96,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size); char *strsep(char **stringp, const char *delim); #endif -#ifndef HAVE_SETPROCTITLE +#ifdef NEED_SETPROCTITLE void setproctitle(const char *fmt, ...); void compat_init_setproctitle(int argc, char *argv[]); #endif diff --git a/openbsd-compat/setproctitle.c b/openbsd-compat/setproctitle.c index eef70c14..71e1595e 100644 --- a/openbsd-compat/setproctitle.c +++ b/openbsd-compat/setproctitle.c @@ -68,8 +68,7 @@ static size_t argv_env_len = 0; void compat_init_setproctitle(int argc, char *argv[]) { -#if !defined(HAVE_SETPROCTITLE) && \ - defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV +#if defined(SPT_TYPE) && SPT_TYPE == SPT_REUSEARGV extern char **environ; char *lastargv = NULL; char **envp = environ; @@ -156,8 +155,6 @@ setproctitle(const char *fmt, ...) pst.pst_command = ptitle; pstat(PSTAT_SETCMD, pst, strlen(ptitle), 0, 0); #elif SPT_TYPE == SPT_REUSEARGV -/* debug("setproctitle: copy \"%s\" into len %d", - buf, argv_env_len); */ len = strlcpy(argv_start, ptitle, argv_env_len); for(; len < argv_env_len; len++) argv_start[len] = SPT_PADCHAR; |