Date: Wed, 9 Jul 2014 20:11:31 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Bryan Drewery <bdrewery@freebsd.org> Cc: arch@freebsd.org Subject: Re: sys/proc.h inclusion of sys/time.h Message-ID: <20140709200949.E1201@besplex.bde.org> In-Reply-To: <53BC4F49.7000903@FreeBSD.org> References: <53BC4F49.7000903@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Tue, 8 Jul 2014, Bryan Drewery wrote:
> 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
> _______________________________________________
> freebsd-arch@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140709200949.E1201>
