summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreyk <reyk@openbsd.org>2015-08-28 15:37:04 +0000
committerreyk <reyk@openbsd.org>2015-08-28 15:37:04 +0000
commit0e43911f14ce3ec06190d2f10431c1d561b8523a (patch)
treef95984f74a70b0058bc8d9499da2b977fdf136b0
parentAdd support for Irix-style "64-bit" archives. (diff)
downloadwireguard-openbsd-0e43911f14ce3ec06190d2f10431c1d561b8523a.tar.xz
wireguard-openbsd-0e43911f14ce3ec06190d2f10431c1d561b8523a.zip
Fix compiling a kernel without NBPFILTER > 0.
OK mikeb@
-rw-r--r--sys/dev/usb/if_run.c7
-rw-r--r--sys/net/if_tun.c7
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 73c87bf0889..b5f0736eeaa 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.109 2015/06/12 15:47:31 mpi Exp $ */
+/* $OpenBSD: if_run.c,v 1.110 2015/08/28 15:37:04 reyk Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2168,7 +2168,10 @@ run_rx_frame(struct run_softc *sc, uint8_t *buf, int dmalen)
struct rt2860_rxwi *rxwi;
struct mbuf *m;
uint32_t flags;
- uint16_t len, phy;
+ uint16_t len;
+#if NBPFILTER > 0
+ uint16_t phy;
+#endif
uint16_t rxwisize;
uint8_t ant, rssi;
int s;
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 8c81ce3680f..31cfdb929db 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_tun.c,v 1.151 2015/07/20 22:54:29 mpi Exp $ */
+/* $OpenBSD: if_tun.c,v 1.152 2015/08/28 15:37:04 reyk Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
@@ -801,7 +801,10 @@ tunwrite(dev_t dev, struct uio *uio, int ioflag)
struct niqueue *ifq;
u_int32_t *th;
struct mbuf *top, **mp, *m;
- int error=0, s, tlen, mlen;
+ int error=0, tlen, mlen;
+#if NBPFILTER > 0
+ int s;
+#endif
if ((tp = tun_lookup(minor(dev))) == NULL)
return (ENXIO);