From: Roy Marples Date: Fri, 30 Oct 2020 22:18:57 +0000 (+0000) Subject: Fix compile without various defines X-Git-Tag: v9.3.2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88702bf5b60ef29c9cf14d3f06077b18c1e7c3b3;p=thirdparty%2Fdhcpcd.git Fix compile without various defines --- diff --git a/src/dhcp.c b/src/dhcp.c index 5af6de32..647a0aaa 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -2082,12 +2082,14 @@ dhcp_addr_duplicated(struct interface *ifp, struct in_addr *ia) #ifdef ARP #ifdef KERNEL_RFC5227 +#ifdef ARPING static void dhcp_arp_announced(struct arp_state *state) { arp_free(state); } +#endif #else static void dhcp_arp_defend_failed(struct arp_state *astate) diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 9e508a69..f106abd9 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1422,13 +1422,15 @@ dhcpcd_signal_cb(int sig, void *arg) return; case SIGUSR2: loginfox(sigmsg, "SIGUSR2", "reopening log"); +#ifdef PRIVSEP if (IN_PRIVSEP(ctx)) { if (ps_root_logreopen(ctx) == -1) logerr("ps_root_logreopen"); - } else { - if (logopen(ctx->logfile) == -1) - logerr("logopen"); + return; } +#endif + if (logopen(ctx->logfile) == -1) + logerr("logopen"); return; case SIGCHLD: while (waitpid(-1, NULL, WNOHANG) > 0)