Make the bpf_maxbufsize a constant when bpfilter pseudo-device is not

present in the kernel config, thus fixing the build. Problem reported
by Havard Eidnes. Solution proposed by Christos, thanks.
This commit is contained in:
rpaulo 2005-12-05 21:46:00 +00:00
parent b898e14a29
commit 7246666eed
2 changed files with 13 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bpf.h,v 1.46 2005/11/30 23:14:38 rpaulo Exp $ */
/* $NetBSD: bpf.h,v 1.47 2005/12/05 21:46:00 rpaulo Exp $ */
/*
* Copyright (c) 1990, 1991, 1993
@ -260,9 +260,6 @@ void bpfattach2(struct ifnet *, u_int, u_int, void *);
void bpfdetach(struct ifnet *);
void bpf_change_type(struct ifnet *, u_int, u_int);
void bpfilterattach(int);
extern int bpf_maxbufsize; /* needed by bpf_filter.c */
#endif
u_int bpf_filter(struct bpf_insn *, u_char *, u_int, u_int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: bpf_filter.c,v 1.24 2005/11/30 23:14:38 rpaulo Exp $ */
/* $NetBSD: bpf_filter.c,v 1.25 2005/12/05 21:46:00 rpaulo Exp $ */
/*-
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.24 2005/11/30 23:14:38 rpaulo Exp $");
__KERNEL_RCSID(0, "$NetBSD: bpf_filter.c,v 1.25 2005/12/05 21:46:00 rpaulo Exp $");
#if 0
#if !(defined(lint) || defined(KERNEL))
@ -46,6 +46,16 @@ static const char rcsid[] =
#endif
#endif
#if defined(_KERNEL_OPT)
#include "bpfilter.h"
#endif
#ifdef NBPFILTER
extern int bpf_maxbufsize;
#else
#define bpf_maxbufsize BPF_MAXBUFSIZE
#endif
#include <sys/param.h>
#include <sys/time.h>