]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: avoid a compile warning on systems without setproctitle
authorRoy Marples <roy@marples.name>
Mon, 8 Jun 2026 16:51:29 +0000 (17:51 +0100)
committerRoy Marples <roy@marples.name>
Mon, 8 Jun 2026 16:51:29 +0000 (17:51 +0100)
src/privsep-root.c

index f50cc351acb3a71eaa819da5224f527fd98513d6..cd231a696963f98f0c89a9451a5a04c8bcac50b3 100644 (file)
@@ -644,12 +644,14 @@ ps_root_startcb(struct ps_process *psp)
 {
        struct dhcpcd_ctx *ctx = psp->psp_ctx;
 
+#ifdef HAVE_SETPROCTITLE
        if (ctx->options & DHCPCD_MANAGER)
                setproctitle("[privileged proxy]");
        else
                setproctitle("[privileged proxy] %s%s%s", ctx->ifv[0],
                    ctx->options & DHCPCD_IPV4 ? " [ip4]" : "",
                    ctx->options & DHCPCD_IPV6 ? " [ip6]" : "");
+#endif
        ctx->options |= DHCPCD_PRIVSEPROOT;
 
        if (if_opensockets(ctx) == -1)