sys/proc.h inclusion of sys/time.h
Bruce Evans
brde at optusnet.com.au
Wed Jul 9 10:11:40 UTC 2014
> 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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "freebsd-arch-unsubscribe at freebsd.org"
>
More information about the freebsd-arch
mailing list