sys/proc.h inclusion of sys/time.h
Bryan Drewery
bdrewery at FreeBSD.org
Tue Jul 8 20:06:39 UTC 2014
In r34924 sys/proc.h was changed to only include sys/time.h if not
building in kernel.
However, as the comment next to time.h says itimerval is needed.
struct proc {
..
struct itimerval p_realtimer; /* (c) Alarm timer. */
This manifests when (hackishly) including sys/proc.h with _KERNEL defined:
> In file included from /root/svn/base/usr.sbin/tcpdump/tcpdump/../../../contrib/tcpdump/print-pflog.c:37:
> /usr/include/sys/proc.h:524:19: error: field has incomplete type 'struct itimerval'
> struct itimerval p_realtimer; /* (c) Alarm timer. */
(Why am I doing this? I need PID_MAX and NO_PID for a tcpdump change I
am testing that is intended for upstreaming. Perhaps I can use
kern.pid_max in __FreeBSD__ and other hacks on other platforms, I have
not yet decided on this.)
Should we move the inclusion of sys/time.h outside of this ifdef or just
add a forward declaration for struct itimerval above struct proc like
many others?
--
Regards,
Bryan Drewery
More information about the freebsd-arch
mailing list