[issue1334] <net/bpf.h> should include <sys/ioccom.h>
guy at alum.mit.edu
Tue Apr 14 12:12:12 PDT 2009
On Apr 14, 2009, at 12:05 PM, Sascha Wildner (via DragonFly issue
Guy, thanks for clarifying,
please see http://leaf.dragonflybsd.org/~swildner/ioccom.diff, which
adjusts our code to this intention (include <sys/ioccom.h> only in
headers where ioctl codes are defined).
If no one objects, I'll commit it tomorrow or Thursday.
One other thing that came to mind, though - there's no (non-obsolete)
UN*X standard for what to include to get ioctl() declared. The Single
UNIX Specification only mentions ioctl() in order to support some
STREAMS stuff, so they declared it in some STREAMS header file - not
very useful for non-STREAMS devices - and that's now obsolete in the
current SUS. I think all the BSDs say that you include <sys/ioctl.h>
to declare it (Mac OS X does).
I might be tempted to move the declaration of ioctl() to sys/ioccom.h
as well; you could then still include <sys/ioctl.h> to get it
declared, but you also get it declared if you include some header that
includes <sys/ioccom.h> and declares ioctls.
More information about the Bugs