]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DragonFlyBSD: Fix compile
authorRoy Marples <roy@marples.name>
Mon, 29 Jul 2019 11:51:13 +0000 (12:51 +0100)
committerRoy Marples <roy@marples.name>
Mon, 29 Jul 2019 11:51:13 +0000 (12:51 +0100)
src/bpf.c
src/dhcp.c
src/if-bsd.c

index ca510e400cf92ba099ddf82c9f6eaf8368d972b2..961c3dc21e5ab08793ce78d0af678090d5024298 100644 (file)
--- 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;
        }
index 36b8c7273dc8451a155d3e3707dd3677ba9602c7..58f74c9c0ff1c20f451f29d49bead1481cdd092b 100644 (file)
@@ -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),
index 911808a2967e6ef520433c740a2c1b5aeec8c8a3..6553e3b7ae25ef6787182bebecf585571c72ffb4 100644 (file)
@@ -51,6 +51,8 @@
 #include <netinet6/nd6.h>
 #ifdef __NetBSD__
 #include <net/if_vlanvar.h> /* Needs netinet/if_ether.h */
+#elif defined(__DragonFly__)
+#include <net/vlan/if_vlan_var.h>
 #else
 #include <net/if_vlan_var.h>
 #endif