]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile without various defines
authorRoy Marples <roy@marples.name>
Fri, 30 Oct 2020 22:18:57 +0000 (22:18 +0000)
committerRoy Marples <roy@marples.name>
Fri, 30 Oct 2020 22:18:57 +0000 (22:18 +0000)
src/dhcp.c
src/dhcpcd.c

index 5af6de329d5bcd60560954db46d617f9f2030f80..647a0aaa78b4ab2310269debcf588987e270af85 100644 (file)
@@ -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)
index 9e508a69ad3b0858dd81fed47a046ce8ff02d575..f106abd9e98981711430f02ae89a9d0726092437 100644 (file)
@@ -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)