summaryrefslogtreecommitdiff
path: root/common/bpf.c
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2007-05-19 16:14:48 +0000
committerDavid Hankins <dhankins@isc.org>2007-05-19 16:14:48 +0000
commitd1045c25b5653fe74ac1d675ff5023205776a30c (patch)
treeb2010810ee87d26bfe144b7a11658949a638135c /common/bpf.c
parent8c7c9ace0eadaf7d3a6c2cc9923a8a84410bd907 (diff)
downloadisc-dhcp-d1045c25b5653fe74ac1d675ff5023205776a30c.tar.gz
Conditionally include ifaddrs.h if USE_BPF_RECEIVE is defined. 'struct
ifaddr' is only used if this method is being used for receive, and not all systems have ifaddrs.h. [ISC Bugs #16865-p1].
Diffstat (limited to 'common/bpf.c')
-rw-r--r--common/bpf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/bpf.c b/common/bpf.c
index eb104b40..0ba61e8e 100644
--- a/common/bpf.c
+++ b/common/bpf.c
@@ -34,7 +34,7 @@
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.53 2007/05/18 17:21:46 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.54 2007/05/19 16:14:48 dhankins Exp $ Copyright (c) 2004 Internet Systems Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -59,7 +59,9 @@ static char copyright[] =
#include "includes/netinet/if_ether.h"
#endif
+#ifdef USE_BPF_RECEIVE
#include <ifaddrs.h>
+#endif
/* Reinitializes the specified interface after an address change. This
is not required for packet-filter APIs. */