From fd8d4ec34785e71de3f8458222d196d454d0e723 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Sep 2012 09:20:46 +0200 Subject: replace: Support setproctitle(). This uses the setproctitle() from libc, libsetproctitle or libbsd. If none is available it provides a dummy implementation. --- lib/replace/replace.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/replace/replace.h') diff --git a/lib/replace/replace.h b/lib/replace/replace.h index c7f9c71175..bbea0fc774 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -128,6 +128,10 @@ #include #endif +#ifdef HAVE_SETPROCTITLE_H +#include +#endif + #if STDC_HEADERS #include #include @@ -845,4 +849,9 @@ typedef long useconds_t; int usleep(useconds_t); #endif +#ifndef HAVE_SETPROCTITLE +#define setproctitle rep_setproctitle +void rep_setproctitle(const char *fmt, ...) PRINTF_ATTRIBUTE(1, 2); +#endif + #endif /* _LIBREPLACE_REPLACE_H */ -- cgit