From: Roy Marples Date: Mon, 29 Jul 2019 11:51:13 +0000 (+0100) Subject: DragonFlyBSD: Fix compile X-Git-Tag: v8.0.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9d84f5de84c4bebeefffe5f28a99a764cb2994d;p=thirdparty%2Fdhcpcd.git DragonFlyBSD: Fix compile --- diff --git a/src/bpf.c b/src/bpf.c index ca510e40..961c3dc2 100644 --- a/src/bpf.c +++ b/src/bpf.c @@ -93,7 +93,7 @@ bpf_frame_header_len(const struct interface *ifp) } } -static const uint8_t etherbroadcastaddr[] = +static const uint8_t etherbcastaddr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; int @@ -104,7 +104,7 @@ bpf_frame_bcast(const struct interface *ifp, const char *frame) case ARPHRD_ETHER: return memcmp(frame + offsetof(struct ether_header, ether_dhost), - etherbroadcastaddr, sizeof(etherbroadcastaddr)); + etherbcastaddr, sizeof(etherbcastaddr)); default: return -1; } diff --git a/src/dhcp.c b/src/dhcp.c index 36b8c727..58f74c9c 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -3384,6 +3384,7 @@ dhcp_readpacket(void *arg) static void dhcp_readudp(struct dhcpcd_ctx *ctx, struct interface *ifp) { + const struct dhcp_state *state; struct sockaddr_in from; unsigned char buf[10 * 1024]; /* Maximum MTU */ struct iovec iov = { @@ -3393,7 +3394,6 @@ dhcp_readudp(struct dhcpcd_ctx *ctx, struct interface *ifp) #ifdef IP_PKTINFO unsigned char ctl[CMSG_SPACE(sizeof(struct in_pktinfo))] = { 0 }; char sfrom[INET_ADDRSTRLEN]; - const struct dhcp_state *state; #endif struct msghdr msg = { .msg_name = &from, .msg_namelen = sizeof(from), diff --git a/src/if-bsd.c b/src/if-bsd.c index 911808a2..6553e3b7 100644 --- a/src/if-bsd.c +++ b/src/if-bsd.c @@ -51,6 +51,8 @@ #include #ifdef __NetBSD__ #include /* Needs netinet/if_ether.h */ +#elif defined(__DragonFly__) +#include #else #include #endif