]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix compile without INET6 and/or INET
authorRoy Marples <roy@marples.name>
Sat, 7 Mar 2015 12:16:38 +0000 (12:16 +0000)
committerRoy Marples <roy@marples.name>
Sat, 7 Mar 2015 12:16:38 +0000 (12:16 +0000)
if-bsd.c
if-options.c

index 7f1d6720b449cc33ea44f6000d02fab5f3a3298a..805ad9cfd975856593239bdedabd2bfd3d3d260c 100644 (file)
--- a/if-bsd.c
+++ b/if-bsd.c
@@ -273,6 +273,7 @@ get_addrs(int type, char *cp, struct sockaddr **sa)
        }
 }
 
+#if defined(INET) || defined(INET6)
 static struct interface *
 if_findsdl(struct dhcpcd_ctx *ctx, struct sockaddr_dl *sdl)
 {
@@ -285,6 +286,7 @@ if_findsdl(struct dhcpcd_ctx *ctx, struct sockaddr_dl *sdl)
        }
        return NULL;
 }
+#endif
 
 #ifdef INET
 const char *if_pfname = "Berkley Packet Filter";
index 78e2b949f25e0f139eaa74a82d79c2648c0eab72..412cee52b74dfb68d2a15ad8fc6c095da7ca837a 100644 (file)
@@ -511,7 +511,7 @@ set_option_space(struct dhcpcd_ctx *ctx,
 
 #if !defined(INET) && !defined(INET6)
        /* Satisfy use */
-       ctx = ctx;
+       ctx = NULL;
 #endif
 
 #ifdef INET6