Bug 17864

Summary: PATCH: sys/resource.h needs sys/time.h for struct timeval
Product: Base System Reporter: Thimble Smith <tim>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.0-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Thimble Smith 2000-04-08 16:30:01 UTC
Programs that include <sys/resource.h> without including <sys/time.h>
first will not compile, because struct timeval is not defined.  This
could be a bug in the program instead of in FreeBSD.  If so, go ahead
and tell me so and I'll bug the program's authors.
Comment 1 Garrett A. Wollman 2000-04-08 17:01:11 UTC
<<On 8 Apr 2000 15:24:48 -0000, "Thimble Smith" <tim@mysql.com> said:

> Programs that include <sys/resource.h> without including <sys/time.h>
> first will not compile, because struct timeval is not defined.  This
> could be a bug in the program instead of in FreeBSD.  If so, go ahead
> and tell me so and I'll bug the program's authors.

<sys/time.h> is a documented prerequisite of <sys/resource.h>:

GETRUSAGE(2)              FreeBSD System Calls Manual             GETRUSAGE(2)

NAME
     getrusage - get information about resource utilization

SYNOPSIS
     #include <sys/types.h>
     #include <sys/time.h>
     #include <sys/resource.h>

GETRLIMIT(2)              FreeBSD System Calls Manual             GETRLIMIT(2)

NAME
     getrlimit, setrlimit - control maximum system resource consumption

SYNOPSIS
     #include <sys/types.h>
     #include <sys/time.h>
     #include <sys/resource.h>

-GAWollman

--
Garrett A. Wollman   | O Siem / We are all family / O Siem / We're all the same
wollman@lcs.mit.edu  | O Siem / The fires of freedom 
Opinions not those of| Dance in the burning flame
MIT, LCS, CRS, or NSA|                     - Susan Aglukark and Chad Irschick
Comment 2 Sheldon Hearn 2000-04-10 17:26:51 UTC
On Sat, 08 Apr 2000 09:10:03 MST, Garrett Wollman wrote:

>  <sys/time.h> is a documented prerequisite of <sys/resource.h>:

Always?  Is gettimeofday(2) wrong, or is this a red herring?

Ciao,
Sheldon.
Comment 3 Danny J. Zerkel 2000-05-10 05:14:42 UTC
This is also a duplicate of bin/5758.
Comment 4 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-05-23 21:50:29 UTC
State Changed
From-To: open->closed

Stale PR