diff options
| author | Roy Marples <roy@marples.name> | 2008-05-14 11:53:58 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2008-05-14 11:53:58 +0000 |
| commit | 45e1c85466284a8c0061be1be0e49dfae33d0550 (patch) | |
| tree | 192a8ca930802e1419df8bac5e85f481220747da /bpf.c | |
| parent | bf6c0cfe0c1fd556f3b9353e36346946d91cac55 (diff) | |
| download | dhcpcd-45e1c85466284a8c0061be1be0e49dfae33d0550.tar.xz | |
BIOCIMMEDIATE isn't always available
Diffstat (limited to 'bpf.c')
| -rw-r--r-- | bpf.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) { |
