Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Oct 1998 12:35:07 -0700 (PDT)
From:      "Brian W. Buchanan" <brian@CSUA.Berkeley.EDU>
To:        Glenn Johnson <gjohnson@nola.srrc.usda.gov>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: incomplete type errors
Message-ID:  <Pine.BSF.4.02A.9810081233350.306-100000@smarter.than.nu>
In-Reply-To: <199810081721.MAA00871@symbion.srrc.usda.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 8 Oct 1998, Glenn Johnson wrote:

> I am trying to compile the code below:
> 
> #include <sys/types.h>
> #ifdef _TIMES
> #include <sys/time.h>
  ^^^^^^^^^^^^^^^^^^^^^
> 
> In file included from etime.c:56:
> /usr/include/sys/resource.h:58: field `ru_utime' has incomplete type
> /usr/include/sys/resource.h:59: field `ru_stime' has incomplete type
> 
> struct  rusage {
>         struct timeval ru_utime;        /* user time used */
>         struct timeval ru_stime;        /* system time used */
	  ^^^^^^^^^^^^^^

struct timeval is defined in <sys/time.h>.  Move the #include directive
for it outside of the #ifdef _TIMES block, as it appears that _TIMES is
not defined.

-- 
Brian Buchanan                                   brian@smarter.than.nu
                                                 brian@soda.CSUA.Berkeley.EDU

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
                -- Benjamin Franklin, 1759


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.02A.9810081233350.306-100000>