From owner-freebsd-arch@FreeBSD.ORG Wed Jul 9 10:11:40 2014 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58C14BD1; Wed, 9 Jul 2014 10:11:40 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 1D3472A2C; Wed, 9 Jul 2014 10:11:39 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id B5CF842560F; Wed, 9 Jul 2014 20:11:31 +1000 (EST) Date: Wed, 9 Jul 2014 20:11:31 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Bryan Drewery Subject: Re: sys/proc.h inclusion of sys/time.h In-Reply-To: <53BC4F49.7000903@FreeBSD.org> Message-ID: <20140709200949.E1201@besplex.bde.org> References: <53BC4F49.7000903@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=U6SrU4bu c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=z5S34nFNDvQA:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=G2AMV_VWqIVSfMJ6v8IA:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jul 2014 10:11:40 -0000 > 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" >