changeset 2998:371e20a2dbba draft

Fix compile without INET6 and/or INET
author Roy Marples <roy@marples.name>
date Sat, 07 Mar 2015 12:16:38 +0000
parents 76a226c99061
children 77d9a1a2a2e3
files if-bsd.c if-options.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/if-bsd.c	Sat Mar 07 12:08:32 2015 +0000
+++ b/if-bsd.c	Sat Mar 07 12:16:38 2015 +0000
@@ -273,6 +273,7 @@
 	}
 }
 
+#if defined(INET) || defined(INET6)
 static struct interface *
 if_findsdl(struct dhcpcd_ctx *ctx, struct sockaddr_dl *sdl)
 {
@@ -285,6 +286,7 @@
 	}
 	return NULL;
 }
+#endif
 
 #ifdef INET
 const char *if_pfname = "Berkley Packet Filter";
--- a/if-options.c	Sat Mar 07 12:08:32 2015 +0000
+++ b/if-options.c	Sat Mar 07 12:16:38 2015 +0000
@@ -511,7 +511,7 @@
 
 #if !defined(INET) && !defined(INET6)
 	/* Satisfy use */
-	ctx = ctx;
+	ctx = NULL;
 #endif
 
 #ifdef INET6