summaryrefslogtreecommitdiffstats
path: root/src/if.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2019-01-23 13:50:34 +0000
committerRoy Marples <roy@marples.name>2019-01-23 13:50:34 +0000
commit700fd4e3d3cc65602427816f7446dada757d0538 (patch)
tree4a8508b3dfcb81176234792b766fa8d2fd0791d0 /src/if.c
parentc2ed9a5cf526a854679e09e9ab7a34af548149a0 (diff)
downloaddhcpcd-700fd4e3d3cc65602427816f7446dada757d0538.tar.xz
IP6ND: Remove #defines for functions when INET6 is disabled
This allows us to optimise the code better and hopefully become less error prone.
Diffstat (limited to 'src/if.c')
-rw-r--r--src/if.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/if.c b/src/if.c
index f6d7ab09..8590e6e0 100644
--- a/src/if.c
+++ b/src/if.c
@@ -88,8 +88,10 @@ if_free(struct interface *ifp)
#ifdef DHCP6
dhcp6_free(ifp);
#endif
+#ifdef INET6
ipv6nd_free(ifp);
ipv6_free(ifp);
+#endif
rt_freeif(ifp);
free_options(ifp->ctx, ifp->options);
free(ifp);
@@ -738,10 +740,12 @@ if_cmp(const struct interface *si, const struct interface *ti)
if (!D_STATE_RUNNING(si) && D_STATE_RUNNING(ti))
return 1;
#endif
+#ifdef INET6
if (RS_STATE_RUNNING(si) && !RS_STATE_RUNNING(ti))
return -1;
if (!RS_STATE_RUNNING(si) && RS_STATE_RUNNING(ti))
return 1;
+#endif
#ifdef DHCP6
if (D6_STATE_RUNNING(si) && !D6_STATE_RUNNING(ti))
return -1;