From: Roy Marples Date: Wed, 14 May 2008 11:53:58 +0000 (+0000) Subject: BIOCIMMEDIATE isn't always available X-Git-Tag: v4.0.2~407 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45e1c85466284a8c0061be1be0e49dfae33d0550;p=thirdparty%2Fdhcpcd.git BIOCIMMEDIATE isn't always available --- diff --git a/bpf.c b/bpf.c index 8dc2c319..fb483f17 100644 --- a/bpf.c +++ b/bpf.c @@ -52,12 +52,13 @@ int open_socket(struct interface *iface, int protocol) { int fd = -1; - int flags; struct ifreq ifr; int buf = 0; struct bpf_version pv; struct bpf_program pf; - +#ifdef BIOCIMMEDIATE + int flags; +#endif #ifdef _PATH_BPF fd = open(_PATH_BPF, O_RDWR); #else @@ -93,9 +94,11 @@ open_socket(struct interface *iface, int protocol) goto eexit; iface->buffer_length = buf; +#ifdef BIOCIMMEDIATE flags = 1; if (ioctl(fd, BIOCIMMEDIATE, &flags) == -1) goto eexit; +#endif /* Install the DHCP filter */ if (protocol == ETHERTYPE_ARP) {