changeset 4944:572ef46ecde3 draft

Linux: clean up some compile warnings without privsep
author Roy Marples <roy@marples.name>
date Wed, 08 Jan 2020 14:26:01 +0000
parents 7dc0c3a4080f
children 9b5c1ee2fe77
files src/if-linux.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/if-linux.c	Wed Jan 08 12:24:38 2020 +0000
+++ b/src/if-linux.c	Wed Jan 08 14:26:01 2020 +0000
@@ -256,6 +256,8 @@
 #ifdef PRIVSEP
 	if (ctx->options & DHCPCD_PRIVSEP)
 		return ps_root_writepathuint(ctx, path, val);
+#else
+	UNUSED(ctx);
 #endif
 
 	fp = fopen(path, "w");
@@ -927,6 +929,7 @@
 	    &link_netlink, NULL);
 }
 
+#ifdef PRIVSEP
 static bool
 if_netlinkpriv(int protocol, struct nlmsghdr *nlm)
 {
@@ -945,6 +948,7 @@
 		return false;
 	}
 }
+#endif
 
 static int
 if_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct nlmsghdr *hdr,