]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: clean up some compile warnings without privsep
authorRoy Marples <roy@marples.name>
Wed, 8 Jan 2020 14:26:01 +0000 (14:26 +0000)
committerRoy Marples <roy@marples.name>
Wed, 8 Jan 2020 14:26:01 +0000 (14:26 +0000)
src/if-linux.c

index 175d5246f2ec2fab1e0593d3201ff130756f2f13..d5dfdedaef0165d78e347dee7b1d7c9d6e3aa73c 100644 (file)
@@ -256,6 +256,8 @@ if_writepathuint(struct dhcpcd_ctx *ctx, const char *path, unsigned int val)
 #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 @@ if_handlelink(struct dhcpcd_ctx *ctx)
            &link_netlink, NULL);
 }
 
+#ifdef PRIVSEP
 static bool
 if_netlinkpriv(int protocol, struct nlmsghdr *nlm)
 {
@@ -945,6 +948,7 @@ if_netlinkpriv(int protocol, struct nlmsghdr *nlm)
                return false;
        }
 }
+#endif
 
 static int
 if_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct nlmsghdr *hdr,