mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 10:35:03 +08:00
Fix build without INET
This commit is contained in:
parent
93f3066bb0
commit
490428b6a9
2
dhcpcd.c
2
dhcpcd.c
@ -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
2
ipv4.h
@ -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
|
||||
|
6
ipv4ll.h
6
ipv4ll.h
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user