Subject: kern/3376: [dM] needs and
To: None <gnats-bugs@gnats.netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: netbsd-bugs
Date: 03/21/1997 20:57:55
>Number:         3376
>Category:       kern
>Synopsis:       [dM] <net/bpf.h> needs <sys/time.h> and <sys/types.h>
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 21 18:05:03 1997
>Last-Modified:
>Originator:     der Mouse
>Organization:
	Dis-
>Release:        1.2_BETA (present in -current as well)
>Environment:
	Any (noticed on SPARCstation-2)
>Description:
	<net/bpf.h> needs, but does not include, <sys/types.h> and
	<sys/time.h>.  The bpf manpage lists four includes; however,
	code can include all four of them and still get errors, if it
	happens to put <net/bpf.h> first (as happens with my style, for
	example, which sorts include files first by length of name).
>How-To-Repeat:
	% cat > z.c
	#include <net/bpf.h>
	#include <sys/time.h>
	#include <sys/types.h>
	#include <sys/ioctl.h>
	<EOT>
	% cc -c z.c
	(note the complaints about <sys/types.h> types in net/bpf.h,
	and the incomplete type for bh_tstamp.)
>Fix:
	--- OLD/sys/net/bpf.h   Thu Jan  1 00:00:00 1970
	+++ NEW/sys/net/bpf.h   Thu Jan  1 00:00:00 1970
	@@ -43,6 +43,9 @@
	 #ifndef _NET_BPF_H_
	 #define _NET_BPF_H_
	 
	+#include <sys/types.h>
	+#include <sys/time.h>
	+
	 /*
	  * Alignment macros.  BPF_WORDALIGN rounds up to the next 
	  * even multiple of BPF_ALIGNMENT. 

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
>Audit-Trail:
>Unformatted: