changeset 3504:42076bdcd8aa draft

Fix compile warnings.
author Roy Marples <roy@marples.name>
date Fri, 08 Apr 2016 20:50:58 +0000
parents b58a0ba5ca2c
children c5856fbb76ff
files ipv4ll.c ipv4ll.h
diffstat 2 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ipv4ll.c	Fri Apr 08 20:35:09 2016 +0000
+++ b/ipv4ll.c	Fri Apr 08 20:50:58 2016 +0000
@@ -445,12 +445,12 @@
 	}
 }
 
+/* This may cause issues in BSD systems, where running as a single dhcpcd
+ * daemon would solve this issue easily. */
+#ifdef HAVE_ROUTE_METRIC
 int
 ipv4ll_handlert(struct dhcpcd_ctx *ctx, __unused int cmd, const struct rt *rt)
 {
-/* This may cause issues in BSD systems, where running as a single dhcpcd
- * daemon would solve this issue easily. */
-#ifdef HAVE_ROUTE_METRIC
 	struct interface *ifp;
 
 	/* Only interested in default route changes. */
@@ -466,7 +466,7 @@
 		if_initrt(ifp);
 		ipv4_buildroutes(ctx);
 	}
-#endif
 
 	return 0;
 }
+#endif
--- a/ipv4ll.h	Fri Apr 08 20:35:09 2016 +0000
+++ b/ipv4ll.h	Fri Apr 08 20:50:58 2016 +0000
@@ -65,7 +65,11 @@
 void ipv4ll_start(void *);
 void ipv4ll_claimed(void *);
 void ipv4ll_handle_failure(void *);
+#ifdef HAVE_ROUTE_METRIC
 int ipv4ll_handlert(struct dhcpcd_ctx *, int, const struct rt *);
+#else
+#define ipv4ll_handlert(a, b, c) (0)
+#endif
 
 #define ipv4ll_free(ifp) ipv4ll_freedrop((ifp), 0);
 #define ipv4ll_drop(ifp) ipv4ll_freedrop((ifp), 1);