Date: Tue, 08 Jul 2014 15:06:33 -0500 From: Bryan Drewery <bdrewery@FreeBSD.org> To: arch@FreeBSD.org Subject: sys/proc.h inclusion of sys/time.h Message-ID: <53BC4F49.7000903@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53BC4F49.7000903>
