From owner-freebsd-arch@FreeBSD.ORG Tue Jul 8 20:06:39 2014 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 484B6703 for ; Tue, 8 Jul 2014 20:06:39 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 319312BD3 for ; Tue, 8 Jul 2014 20:06:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s68K6dY3081004 for ; Tue, 8 Jul 2014 20:06:39 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id s68K6cVv081003 for arch@FreeBSD.org; Tue, 8 Jul 2014 20:06:38 GMT (envelope-from bdrewery) Received: (qmail 17027 invoked from network); 8 Jul 2014 15:06:35 -0500 Received: from unknown (HELO blah) (freebsd@shatow.net@67.182.131.225) by sweb.xzibition.com with ESMTPA; 8 Jul 2014 15:06:35 -0500 Message-ID: <53BC4F49.7000903@FreeBSD.org> Date: Tue, 08 Jul 2014 15:06:33 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: arch@FreeBSD.org Subject: sys/proc.h inclusion of sys/time.h Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Tue, 08 Jul 2014 20:06:39 -0000 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