Fix build without INET

This commit is contained in:
Roy Marples 2016-01-22 10:11:16 +00:00
parent 93f3066bb0
commit 490428b6a9
3 changed files with 9 additions and 1 deletions

View File

@ -945,11 +945,13 @@ dhcpcd_startinterface(void *arg)
}
}
#ifdef INET
if (ifo->options & DHCPCD_IPV4) {
/* Ensure we have an IPv4 state before starting DHCP */
if (ipv4_getstate(ifp) != NULL)
dhcp_start(ifp);
}
#endif
}
static void

2
ipv4.h
View File

@ -138,7 +138,7 @@ void ipv4_ctxfree(struct dhcpcd_ctx *);
#define ipv4_free(a) {}
#define ipv4_ctxfree(a) {}
#define ipv4_hasaddr(a) (0)
#define ipv4_preferanother(a) (0)
#define ipv4_preferanother(a) {}
#endif
#endif

View File

@ -28,6 +28,7 @@
#ifndef IPV4LL_H
#define IPV4LL_H
#ifdef INET
#include "arp.h"
extern const struct in_addr inaddr_llmask;
@ -68,5 +69,10 @@ void ipv4ll_handle_failure(void *);
#define ipv4ll_free(ifp) ipv4ll_freedrop((ifp), 0);
#define ipv4ll_drop(ifp) ipv4ll_freedrop((ifp), 1);
void ipv4ll_freedrop(struct interface *, int);
#else
#define IPV4LL_STATE_RUNNING(ifp) (0)
#define ipv4ll_free(a) {}
#define ipv4ll_drop(a) {}
#endif
#endif