Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX - forked.net   » Compile Problems   » resource.h

UBBFriend: Email this page to someone!    
Author Topic: resource.h
Tom
Junior Member
Member # 581

posted January 02, 2003 08:37 PM      Profile for Tom   Email Tom   Send New Private Message      Edit/Delete Post  Reply With Quote 
I am having trouble compling some code. When trying To Make I get the Following...

In file included from comm.c:21:
/usr/include/sys/resource.h:81: field `ru_utime' has incomplete type
/usr/include/sys/resource.h:82: field `ru_stime' has incomplete type

I checked The the resource.h file, and It "looks" ok...

struct rusage {
struct timeval ru_utime; /* user time used */
struct timeval ru_stime; /* system time used */
...

Can Anyone Give any ideas?


Posts: 3 | Registered: Jan 2003  |  IP: Logged
<trevorsm>
unregistered

posted January 03, 2003 12:15 PM           Edit/Delete Post  Reply With Quote 
Hm, I've never seen an error of that type before... The syntax looks perfect (I could be overlooking something though) as well. Perhaps the error is coming from the timeval structure? Is timeval something you declared or is it from another header you're using (too lazy to look it up).
IP: Logged
Tom
Junior Member
Member # 581

posted January 03, 2003 07:47 PM      Profile for Tom   Email Tom   Send New Private Message      Edit/Delete Post  Reply With Quote 
Well... I haven't Changed the resource.h from what OSX10.2 gives ya... I looked thru it all... I didn't see a decloration for timeval, and the only include is "sys/appleapiopts.h"
Posts: 3 | Registered: Jan 2003  |  IP: Logged
<trevorsm>
unregistered

posted January 03, 2003 09:04 PM           Edit/Delete Post  Reply With Quote 
I checked out the resource.h header file on my computer and I didn't find a declaration for timeval either. I wrote a quick mock up program that included the code...

code:

struct parent
{
struct child num_one;
struct chile num_two;
};

...and surely enough, I was given an "incomplete type" error. From that, two things come two mind--this file must be meant to be included into another file which does define the timeval structure and the person who wrote this file was using very bad form.

With all that said, I need a lot more info to figure out what's going on... What does the file that includes resources.h look like? What other headers does it include?

Has anyone else heard of tis timeval structure? I've never heard of or used it before.


IP: Logged
Tom
Junior Member
Member # 581

posted January 04, 2003 06:51 PM      Profile for Tom   Email Tom   Send New Private Message      Edit/Delete Post  Reply With Quote 
On searching a little bit through all the sys/ foles... i did find a Reference to timeval in the sys/time.h I added an Include line for sys/time.h and it got rid of the error... thanks for the help!!
Posts: 3 | Registered: Jan 2003  |  IP: Logged

All times are Pacific Time  

Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Hop To:

Contact Us | macosx.forked.net

Powered by Infopop Corporation
Ultimate Bulletin BoardTM 6.1.0.2