NetBSD Problem Report #508
From gnats Thu Oct 6 21:55:04 1994
Received: from python.CS.ORST.EDU (root@python.CS.ORST.EDU [128.193.164.60]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id VAA10536 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Thu, 6 Oct 1994 21:55:04 -0700
Message-Id: <199410070456.VAA18062@helix.CS.ORST.EDU>
Date: Thu, 6 Oct 1994 21:56:10 -0700
From: "Jason R. Thorpe" <thorpej@mail.CS.ORST.EDU>
Reply-To: thorpej@mail.CS.ORST.EDU
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: <sys/resource.h> requires <sys/types.h> but doesn't #include it
X-Send-Pr-Version: 3.2
>Number: 508
>Category: misc
>Synopsis: <sys/resource.h> requires <sys/types.h> but doesn't #include it
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 06 22:05:02 +0000 1994
>Closed-Date: Fri Oct 07 08:26:05 +0000 1994
>Last-Modified:
>Originator: Jason R. Thorpe
>Release: NetBSD 1.0_BETA (sup'd ~2.5 weeks ago)
>Organization:
--------------------------------------------------------------------------
Jason R. Thorpe thorpej@cs.orst.edu 758-2003
Systems Administrator CSWest Room 5 737-2229
CS Dept, Oregon State University http://www.cs.orst.edu/~thorpej
"I brought my BOWLING BALL -- and some DRUGS!"
-- ztp
>Environment:
System: NetBSD helix 1.0_BETA NetBSD 1.0_BETA (HELIX) #24: Thu Sep 15 23:17:39 PDT 1994 thorpej@helix:/usr/src/sys/arch/hp300/compile/HELIX hp300
>Description:
<sys/resource.h> used quad_t, which is typedef'd in <sys/types.h>,
yet does not #include <sys/types.h>, but instead relies on the
prgrammer to #include it first, which won't happen when following
a coding style that requires sys includes first in alpha-order,
and then other includes in alpha-order.
>How-To-Repeat:
Try to compile something like Dhrystone 2.1...You'll see:
cc -DUNIX -DROPT -O6 -O -c timers_b.c
In file included from timers_b.c:79:
/usr/include/sys/resource.h:102: parse error before `quad_t'
/usr/include/sys/resource.h:102: warning: no semicolon at end of struct or union
/usr/include/sys/resource.h:103: warning: data definition has no type or storage class
/usr/include/sys/resource.h:108: parse error before `fixpt_t'
/usr/include/sys/resource.h:108: warning: no semicolon at end of struct or union
/usr/include/sys/resource.h:110: parse error before `}'
*** Error code 1
Stop.
Stop.
>Fix:
#include <sys/types.h> in <sys/resource.h>
Here's a patch:
*** resource.h.orig Thu Oct 6 21:47:45 1994
--- resource.h Thu Oct 6 21:47:50 1994
***************
*** 38,43 ****
--- 38,45 ----
#ifndef _SYS_RESOURCE_H_
#define _SYS_RESOURCE_H_
+ #include <sys/types.h>
+
/*
* Process priority specifications to get/setpriority.
*/
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: mycroft
State-Changed-When: Fri Oct 7 01:26:05 PDT 1994
State-Changed-Why:
This patch is bogus.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.