changeset 5530:226b850d158d draft

Fix compile without various defines
author Roy Marples <roy@marples.name>
date Fri, 30 Oct 2020 22:18:57 +0000
parents 16610f4104a4
children 68571e2fc30d
files src/dhcp.c src/dhcpcd.c
diffstat 2 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp.c	Fri Oct 30 16:13:49 2020 +0000
+++ b/src/dhcp.c	Fri Oct 30 22:18:57 2020 +0000
@@ -2082,12 +2082,14 @@
 
 #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)
--- a/src/dhcpcd.c	Fri Oct 30 16:13:49 2020 +0000
+++ b/src/dhcpcd.c	Fri Oct 30 22:18:57 2020 +0000
@@ -1422,13 +1422,15 @@
 		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)